Question: Question 1 Build a REST API for a movie management system using NodeJS. Technical specifications: Tech stack: Backend: NodeJS Database: In - memory Database model

Question 1
Build a REST API for a movie management system using NodeJS.
Technical specifications:
Tech stack:
Backend: NodeJS
Database: In-memory
Database model parameters:
movies: [id: integer, title: stping, director: string, releaseYear: integer]
API Endpoints:
POST 'api/movies" : Create a new movie by extracting the title, director, and release year from the request body, and respor
GET '/api/movies" : Fetches the movies with pagination support, retrieving a subset of movies based on specified page and 1
GET 'api/movies/{id}'; Retrieve a movie by its ID from the database, responding with a JSON object containing the movie's '
PATCH 'api/movies/{id}: Updates the corresponding movie record in the database based on the provided ID. Upon successful t
GET 'api/movies/sort/year/{order}' : Retrieve movies sorted by release year. It expects a sorting order ('asc' for ascendin
DELETE 'api/movies' : Deletes all movies from the database. If the deletion is successful, respond with a Json object conta
DELETE 'api/movies/{id}' : Delete a specific movie from the database based on its ID. If the deletion is successful, respon
N.B.: All the edge cases for each of the API Endpoints must be handled properly & provide the list of such edge cases handled for
each endpoint.
 Question 1 Build a REST API for a movie management system

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!