The api for the c-hack user management system
- python 3.7
- pipenv [python 3.7]
# Setup pipenv and install dependencies
pipenv install --dev
#pipenv install #when not wanting dev depedencies.
First start:
source "$(pipenv --venv)/bin/activate"
export FLASK_APP=ums_api
export FLASK_DEBUG=1 # to enable autoreload
export MODE=debug
# export MODE=production
# export MODE=test
flask create_db
# start server
flask run
Subsequent starts:
flask run
Instead the file shell.nix can be used with the program nix-shell:
nix-shell
Then everything is set up for you and you only need to start the server:
flask run
See flask wsgi documentation. The preparations as shown above are required.