Webapp template/example:
- Backend REST API implemented in Python / Flask
- Frontend app implemented in Typescript / React
The easiest way to deploy the service is by Docker.
docker-compose up
This should start the service in http://localhost:5000/
The backend server is a modified version of Flask Tutorial.
You need Python 3. Using a venv
or conda
is also recommended.
pip install -r requirements.txt
To run tests:
pytest test
To start the server:
export FLASK_APP=server
flask run
The default port for the backend http://127.0.0.1:5000/
The ./frontend
directory is created by create-react-app.
To build the frontend, you will need:
- nodejs (tested on v13.8.0)
- npm (tested on v6.14.6) or yarn (tested on v1.22.0)
yarn install
# or `npm install`
To run the frontend in the development mode on http://localhost:3000, run:
npm start
To build frontend Typescript into a static minified bundle, run:
npm run build