Project focus on the payment management of a salon management application. This project was created to explore scalable cloud programming.
This API uses Serverless Framework.
In order to package your dependencies locally with serverless-python-requirements
, you need to have Python3.8
installed locally. You can create and activate a dedicated virtual environment with the following command:
python3.8 -m venv ./venv
source ./venv/bin/activate
In order to run locally, you will need to first install werkzeug
dependency, as well as all other dependencies listed in requirements.txt
. It is recommended to use a dedicated virtual environment for that purpose. You can install all needed dependencies with the following commands:
pip install werkzeug
pip install -r requirements.txt
Then run command:
serverless wsgi serve
This example is made to work with the Serverless Framework dashboard, which includes advanced features such as CI/CD, monitoring, metrics, etc.
In order to deploy with dashboard, you need to first login with:
serverless login
install dependencies with:
npm install
and
pip install -r requirements.txt
and then perform deployment with:
serverless deploy
After running deploy, you should see output similar to:
Deploying payment-management-dev-api to stage dev (us-east-1)
✔ Service deployed to stack payment-management-dev-api (182s)
endpoint: ANY - https://xxxxxxxx.execute-api.us-east-1.amazonaws.com
functions:
api: payment-management-dev-api