Backend REST API for Mentorship System. Depending on branches the following instances of application are running
Branch | Server |
---|---|
gsoc18-code | Development |
develop | Staging |
master | Production |
The project runs on Python 3.
-
Create a virtual environment:
virtualenv venv --python=python3
-
Activate the virtual environment:
source ./venv/bin/activate
-
Install all the dependencies in
requirements.txt
file:pip install -r requirements.txt
-
Export the following environment variables:
export FLASK_ENVIRONMENT_CONFIG=<dev-or-test-or-prod>
export SECRET_KEY=<your-secret-key>
export SECURITY_PASSWORD_SALT=<your-security-password-salt>
export MAIL_DEFAULT_SENDER=<mail-default-sender>
export MAIL_SERVER=<mail-server>
export APP_MAIL_USERNAME=<app-mail-username>
export APP_MAIL_PASSWORD=<app-mail-password>
-
Run the app:
python run.py
-
When you are done using the app, deactivate the virtual environment:
deactivate
To run the unitests run the following command in the terminal (while the virtual environment is activated):
python -m unittest discover tests