To run this project you need to install:
All what you need is packed on docker-compose.
Setup the project:
make build
Start application:
make up
This command will launch these services:
- The API, accessible on http://localhost:5000/health
- Postgres database on port 5432
- Postgres database on port 5433 for running tests
Apply migrations on database:
make db-upgrade
Run seeds to create teams and simulate groups / playoff matches:
make db-seed
Endpoints with data:
- Events GET: http://localhost:5000/events/1
- Groups GET: http://localhost:5000/events/1/groups
- Playoff matches GET: http://localhost:5000/events/1/playoff
When making API calls, you need to send x-api-key in request header with the value that is on your .env file.
The idea of the event id being a parameter was thinking of a better API modeling. If you need to create other events, entities and relationships are ready for it
To run linter:
make lint
To run tests:
make test