you can use docker to run the app on a container or install and run it locally.
- Docker
- Docker Compose
.env
file: you can use .env.example file as a template. just rename it to.env
file.
1-1- Build the Stack: Open a terminal at the project root and run the following for local development:
$ docker-compose build
# you can use makefile too:
$ make docker-build
1-2- Run the docker-compose:
$ docker-compose up
# you can use makefile too:
$ make docker-run
you can access the API using the following url:
# fibsum:
$ curl http://127.0.0.1:8000/api/v1/fibsum/12
$ curl http://127.0.0.1:8000/api/v1/fibsum/{target_value_as_int}
# health check:
$ curl http://127.0.0.1:8000/api/v1/health
# run tests on all supported python versions
$ make docker-test
# run tests only on default python version: python3.8
$ make docker-tox
Installing the app on your local machine, you can run tests and test coverage commands directly.
2-1: Install poetry:
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
2-2: Installing dependencies:
make install
2-3: Run server:
make server
- Run test without overage report:
make test
- add swagger documentation
- improve algorithm in regards to memoization of duplicate paths.