/Keebie

Primary LanguageJavaScriptMIT LicenseMIT

Keebie

Build project on local devices

I. Install dependencies:

  • 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

II. Set up backend:

  • Create a file named .env includes:
MYSQL_USER=root
MYSQL_PASSWORD=4444
MYSQL_SERVICE_HOST=localhost
MYSQL_SERVICE_PORT=3306
MYSQL_DATABASE=keebie

III. Set up frontend:

  • Create a file named .env.local includes:
REACT_APP_BASE_URL=http://127.0.0.1:8000

IV. Run project:

1. Option 1:

  • Build frontend:
$ cd frontend
$ yarn build
  • Run backend:
$ cd backend
$ python main.py

2. Option 2:

  • Run backend:
$ cd backend
$ python main.py
  • Run frontend:
$ cd frontend
$ yarn start

Build project on platform

I. Build frontend

  • 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.

II. Run server

  • On the platform, run backend:
$ cd backend
$ python main.py
  • Expose port 8000 on the platform:
/etc/jupyter/bin/expose 8000