Inside the root folder, provide a .env file with the following contents:
FLASK_APP=app.app
FLASK_ENV=development || production || testing
JWT_SECRET_KEY="your_secret_jwt_string"
DATABASE_URL=your_database_URI (only needed if FLASK_ENV=production)
From the vertech-email-backend folder:
python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
From the vertech-email-backend folder:
. .venv/bin/activate
flask db init
flask db migrate
flask db upgrade
From the vertech-email-backend folder:
flask run --debug
You can go to http://localhost:5000/api/swagger-ui for a full documentation in the api
As code improvements for back-end from group 9 to group 8, we suggest:
-
Cleaning some functions calling that weren't used in some files
-
Create a docker compose file to run needed services in local, which facilite running the project on any machine (simulating production enviroment). With this, when run
docker compose upyou only have an .env file like:FLASK_APP=app.app FLASK_ENV=production DATABASE_URL=postgresql://postgres:your_password@db:5432/your_database JWT_SECRET_KEY=your_secret_jwt_string -
The code is documented
-
The Schemas are ordered by categories
-
The Dockerfile includes documentation that outlines the proposed steps for the build process.
-
Environment variables from the .env file are not set inside the build recipe. This helps to ensure the adequate management of environment variables.
-
Implements testing pipeline with informative summary, in order to find and address bugs quicker.
Preview suggestions are related to the pull request: