- Python
- pip
- Flask
- Javascript
- ReactJS
- NPM
- webpack
- CSS
- Docker
Option 1: python server
-
use pip to install the requirements of the server:
$ pip install -r requirements.txt
Obs.: I highly recommend to use a virtual env to avoid dependency conflicts. -
change directory to static folder:
$ cd static -
install front end dependencies:
$ npm install
(dev-only):
$ npm i webpack --save-dev
$ npm i babel-core babel-loader babel-preset-es2015 babel-preset-react --save-dev
$ npm i react react-dom --save-dev -
build the front end:
$ npm run build
Obs.: You can use 'npm run watch' to avoid building the front end everytime a change is made. -
change to main directory:
$ cd .. -
run the server:
$ python server.py -
access via browser http://localhost:5000 and you are good to go :)
Option 2: Docker
-
build the application:
$ docker-compose build -
run the server:
$ docker-compose up -
access via browser http://localhost:5000 and you are good to go :)