- Docker (Developed on Docker Desktop v4.17.0 with Docker Engine v20.10.23.)
- Docker Compose ( included in Docker Desktop )
- Move to project directory
- Run
docker-compose -f docker-compose.yml up --build
- Run
docker ps
to get the name/id of the php container - Run
docker exec -it {Name/ID} /bin/sh
- Run in the container:
php artisan migrate --seed
- List competitions: GET
http://localhost/api/competitions
- Get one competition: GET
http://localhost/api/competitions/{competitionId}
- Create one competition: POST
http://localhost/api/competitions
Body:{ "name": "Chess", "player_limit": 20 }
- Add player to competition: POST
http://localhost/api/competitions/{competitionId}/player
Body:{ "name": "Johnnie Lubowitz" }
- Increment player's score on competition: POST
http://localhost/api/competitions/{competitionId}/player/{playerId}
Body:{ "score": 22 }