Python + React is a repo for a quick setup of a web application.
Characteristics:
- Python 3 (uses env).
- React (uses babel | as front-end).
- Flask (as back-end).
- Using HTTP:
git clone https://github.com/cesarau04/python-react-webapp.git
- Using SSH:
git clone [email protected]:cesarau04/python-react-webapp.git
You can also:
- Download a zip file
- python3
- python3-venv
- python3-pip
- node
- npm
- Activate python env and install dependencies
$ cd path/to/repo
$ python3 -m venv env
$ source ./env/bin/activate
$ pip install -r requirements.txt
In the future to activate the virtual env use $ source ./env/bin/activate
- Install npm dependencies
$ cd ./templates/static
$ npm install
- In one terminal move to
./templates/static
and init webpack module bundler
$ npm run watch
- In other terminal move to root folder and init flask back-end
$ python3 ./run.py
CTRL+C
in both terminals- If you want you can terminate the python env with
$ deactivate
ISC
Based on eyong kevin tutorial