Backend APIs for Movies library.
- clone the project.
- install NodeJS on your machine.
- run
npm i
. - add config.env ex:
- PORT=3000
- LOCAL_DB_STR=mongodb://localhost:27017/fepDB
- ADMINNAME=Mohamed
- unComment addMovies function in ".config/DBconnection.js" to instert data (don't forget to comment it back).
- run
npm start
.
- movies:
- POST: http://localhost:3000/movies/ for creating a new movie
- GET: http://localhost:3030/movies/ for fetching all movies in the database
- GET: http://localhost:3030/movies/genre to get Movies with every genre (your task is here check controller )
- patch: http://localhost:3030/movies/movie/id for updating a movie with id
- DELETE: http://localhost:3030/movies/movie/id for deleting a movie with id
- POST: http://localhost:3000/movies/ for creating a new movie