Movie Service is a microservice that provides a REST API for movies.
git clone https://github.com/buraksaraloglu/movie-service.git
cd movie-service
npm install
npm dev
npm run build
npm start
npm test
Get All Movies
# GET /movie
curl --location --request GET '<service-uri>/movie' \
--header 'user: <userId>' \
Get Movie by ID
# GET /movie/:movieId
curl --location --request GET '<service-uri>/movie/:movieId' \
--header 'user: <userId>' \
Create Movie
# POST /movie
curl --location --request POST '<service-uri>/movie' \
--header 'Content-Type: application/json' \
--header 'user: <userId>' \
--data-raw '{
"name": "Titanic",
"releaseDate": "1997-12-19"
}'
Update Movie
# PUT /movie
curl --location --request PUT '<service-uri>/movie' \
--header 'Content-Type: application/json' \
--header 'user: <userId>' \
--data-raw '{
"name": "Titanic",
"releaseDate": "2022-12-19"
}'