A SSO website backend for my platform deployed as a serverless REST API.
- Python >= 3.6
Run the following command to create a new Python Virtual Environment for running this application:
python3 -m venv venv
**Note: Creation of Virtual Environment needs to be only done once when this repository is downloaded.
Run the following command to activate the created Virtual Environment:
source venv/bin/activate
Note: This needs to run each time the application needs to be run in a terminal
Run the following command to run to install dependencies of this application into the Virtual Environment:
pip3 install -r requirements.txt
pip3 install -r dev_requirements.txt
Run the following commands to add a new pip dependencies to this application. The command below show the example of installing flask
package.
pip3 install flask
echo 'flask' >> requirements.txt
pip3 install -r requirements.txt
pip3 freeze > requirements.txt
Run the application by running the following commands:
export FLASK_APP=api/run.py
flask run
Run the following script to perform code linting on your application
flake8 api
Run the following command to run tests:
Run the following command to run the coverage report for your code:
Stop the application by running Command (⌘) + c
Run the following commands to exit from the activated Virtual Environment:
deactivate
To install application with the configured environments run the following command:
zappa deploy beta
This will deploy the application exposing a api gateway.
To uninstall the application run the following command:
zappa undeploy beta
Dependant repositories:
- Branching Strategy: https://github.com/ameyrupji-com/ameyrupji.com-branching-strategy
- Infrastructure as Code: https://github.com/ameyrupji-com/ameyrupji.com-iac
- Frontend: https://github.com/ameyrupji-com/sso.ameyrupji.com
- Developer Portal: https://github.com/ameyrupji-com/developer.sso.ameyrupji.com
References: