-
In the terminal, or command prompt, move to the server folder.
-
Run the following command:
python -m venv venv
-
When the installation finished, when use with VS Code, click View -> Command Palette -> Python: Select Interpreter.
In the prompt input, enter:
.\server\venv\Scripts\python.exe
-
Activate the virtual environment.
For Windows, run:
venv\Scripts\activate.bat
For Mac/Linix, run:
source venv/bin/activate
-
Install Python packages (currently, Python 3.8 is supported)
Run the command:
pip install -r server/requirements.txt
-
In the root folder, create a file called .env name. Add the following content to it:
FLASK_APP=server.application
-
If you use VS Code, create a launch.json as described here https://code.visualstudio.com/docs/python/tutorial-flask#_run-the-app-in-the-debugger
When prompted to enter the python file name, change app.py to application.py.
In another terminal, run the following command to install the NPM packages:
npm install
-
In one terminal, move to server folder and run the command:
flask run
or, if you use VS Code click Run -> Start Debugging.
-
In another terminal (for example, windows prompt), move to webapp folder and run the following command:
npm run dev
This commain will run the webpack server with hot reloading. To compile the production code, please run the following command:
npm run prod
-
In your favorite browser, navigate to http://127.0.0.1:5000/