Build project on local devices
- Make sure that Node.js has been installed by running
npm -v
. If not successfully, please checkout https://nodejs.org/en/download to install Node.js.
- Run
npm install -g yarn
to install yarn
.
- Run in terminal:
$ cd frontend
$ yarn
$ cd ../backend
$ pip install -r requirements.txt
- Create a file named
.env
includes:
MYSQL_USER=root
MYSQL_PASSWORD=4444
MYSQL_SERVICE_HOST=localhost
MYSQL_SERVICE_PORT=3306
MYSQL_DATABASE=keebie
- Create a file named
.env.local
includes:
REACT_APP_BASE_URL=http://127.0.0.1:8000
$ cd frontend
$ yarn build
$ cd backend
$ python main.py
$ cd backend
$ python main.py
$ cd frontend
$ yarn start
Build project on platform
- Make sure there is no
.env*.local
file in the frontend/
directory.
- Build frontend:
$ cd frontend
$ yarn build
- Upload
build/
to the frontend/
directory on platform.
- On the platform, run backend:
$ cd backend
$ python main.py
- Expose port 8000 on the platform:
/etc/jupyter/bin/expose 8000