a onepage react app served by flask & sqlite/postgres db, deployed easily on heroku.
$ git clone...
$ cd <>
sudo -u postgres psql postgres
$ virtualenv -p python3 venv
$ pip install -r requirements.txt
$ gunicorn app:app
$ cd client
$ npm install
$ chmod +x run_dev.sh
$ ./run_dev.sh
To build client app comment out process.env.REACT_APP_USERS_SERVICE_URL
and run : npm run build
To check the build directory on a static server :
$ cd build
$ python3 -m http.server
Disable flask-CORS
$ heroku login ...
$ heroku create <your-app-name>
$ heroku addons:add heroku-postgresql:hobby-dev
$ heroku run python
>>> import os
>>> os.environ.get('DATABASE_URL')
copy db_url to your app_config, and then:
$ heroku git:remote <your-app-name>
$ git push heroku master
$ heroku run python
>>> from app import db
>>> db.create_all()
>>> exit()