To set up and run the TypeScript-Webapp project, follow these steps:
First, navigate to the project directory called local-news-network. You can do this using the cd command:
cd path/to/local-news-networkOnce you are inside the local-news-network directory, you need to install the project dependencies. This involves using both npm and pip for JavaScript and Python dependencies respectively.
In your terminal, run the following command to install JavaScript dependencies using npm:
npm installTo install Python dependencies, it's a good practice to use a virtual environment. First, make sure you have Python installed. Then, create a virtual environment and activate it:
python -m venv venv_name
source venv_name/bin/activateOnce the virtual environment is activated, you can install the Python dependencies listed in requirements.txt using pip:
pip install -r requirements.txtTo run the TypeScript-Webapp project, you'll need to open two separate terminal windows, both within the local-news-network directory.
In the first terminal, start the JavaScript development server using the following command:
npm run devThis command will compile and serve your TypeScript-Webapp, making it accessible in your web browser.
In the second terminal, make sure your virtual environment is activated (as mentioned in Step 2). Then, start the Python server:
source venv_name/bin/activate
python server.pyRunning these two commands simultaneously will enable your web application to function with the front-end served by the JavaScript development server and the back-end served by the Python server.
With these steps, your TypeScript-Webapp project should be up and running locally. You can access it in your web browser at the specified URL.
You can copy and paste this Markdown text into a Markdown file for documentation purposes.