A simple api with hapijs
- MongoDb 3.*
- yarn
- yarn start
curl -X POST
http://localhost:8000/movies/1/likes
-H 'cache-control: no-cache'
-H 'content-type: application/json'
-d '{"user_id":1,"like":true}'
curl -X GET
http://localhost:8000/movies/1/likes
-H 'cache-control: no-cache'
-H 'content-type: application/json'
curl -X GET
'http://localhost:8000/movies/1/likes?user_id=1'
-H 'cache-control: no-cache'
-H 'content-type: application/json'
curl -X DELETE
http://localhost:8000/movies/1/likes
-H 'cache-control: no-cache'
-H 'content-type: application/json'
-d '{"user_id":1}'
curl -X GET
http://localhost:8000/movies/now_playing
-H 'cache-control: no-cache'
-H 'content-type: application/json'