API for cinema world that can be used to view showtimes and book tickets
- Docker
- sbt
-
Start the postgres container:
docker-compose up
-
Use to query directly to database:
docker exec -it {container name} psql -U postgres
-
Start the server:
sbt run
- http://localhost:8080/movies -> To stop the server, press Enter in the console
To run tests sbt test
. Container must be running for integration test to run.
GET movies
: returns all showing movies
GET movies/{}
: takes movieId to get movie info
GET movies/{}/showtimes
: takes movieId to get showtimes for the movie
POST reserve/{}
: takes showtimeId to book showtime seat
PUT cancel/{}
: takes reservationId to cancel reservation and decide penaltys