A API that can Store a list of Movies and Series which USER can Add , Update and Delete.
This project is a REST API with Authentication and Authorization.
- NodeJs
- MongoDB
npm installAdd environmental variables in src/config/.env Format:
PORT= #Define a port here
MONGODB="" #Add your MongoDB link
JWT_SECRET="" #Add a unique secret key for web tokensnpm run devnpm start- http://localhost:3000/auth/register --> Register a user.
- http://localhost:3000/auth/login --> Login and collect token.
User can then use this token to further reach other endpoints.
-
http://localhost:3000/movies/ --> Gets all document.
-
http://localhost:3000/movies/:id --> Gets a uniques document.
-
http://localhost:3000/movies/save --> Save a single document.
-
http://localhost:3000/movies/update/:id --> Updates a single document.
-
http://localhost:3000/movies/delete/:id --> Deletes a single doucment.
id: Unique ID of Document in MongoDB
-
http://localhost:3000/series/ --> Gets all document.
-
http://localhost:3000/series/:id --> Gets a uniques document.
-
http://localhost:3000/series/save --> Save a single document.
-
http://localhost:3000/series/update/:id --> Updates a single document.
-
http://localhost:3000/series/delete/:id --> Deletes a single doucment.
id: Unique ID of Document in MongoDB
Thank You!
