API gateway or BFF for FiuFit's microservice structure
This project was build with poetry to manage dependencies.
Having poetry installed, run this command to install the dependencies:
poetry install
To add new dependencies, you can run:
poetry add <dependency>
NOTE: Don't forget to commit all changes to poetry.lock and pyproject.toml!
To activate the virtual environment run:
poetry shell
Then, you can run the app using:
python src/main.py
To run the formatter:
black [Options] path
To run the linter:
flakeheaven lint path
To run the tests:
pytest
If you want to check code coverage locally:
pytest --cov -v
Finally, you can exit the virtual environment:
exit
In addition to running it directly within poetry's virtual environment you can run the project with Docker:
-
Create a
.envfile with the same environment variables as in.example-env -
Run
docker build -t fiufit-gateway . -
Run
docker run -p PORT:PORT --env-file=.env fiufit-gateway
-
Fly.io deploy dashboard:
-
Swagger docs:
-
Coverage report:
