APIs for ci-user-frontend consumption
Install python and pip
sudo apt install python3
sudo apt install python3-pip
Create a virtual environment
pip3 install --user virtualenv
virtualenv venv
source venv/bin/activate
Install dependencies
pip3 install -r requirements.txt
Export environment variables using either of the following
- Export variables from the command line
- or install autoenv and create a .env file as such:
source venv/bin/activate export FLASK_APP="app.py" export FLASK_DEBUG=1 export APP_SETTINGS="config.DevelopmentConfig" export SECRET_KEY="some_secret_key" export DATABASE_URL="postgresql://abc:xyz@localhost:5432/ci_onboarding"
Start the application
flask run
To run tests
python -m pytest