diff_months: 12

Create a Node.js application that exports RESTful APIs for Movies

Download Solution Now
Added on: 2024-11-23 15:00:06
Order Code: SA Student soyeon Assignment(8_23_35367_21)
Question Task Id: 493044

Create a Node.js application that exports RESTful APIs for Movies

using this website:https://www.mockaroo.com/, create dummy movies JSON records, each movie record should be structured as following:

id: unique id (uniquely generated), use theuuidpackagehttps://www.npmjs.com/package/uuidtitle: Movie Title (required, min=1, max=128)

year: release year (required, 4 digits, min=1900, max=current year, detect the current year fromdate)

rating: rating value 1 - 5, it can accept a decimal value such as 3.6 (options, default =1)

genres: list of genres for this movie, list can be as an array or has a delimiter, such as pipe "|" or comma "," (optional, default'')

Example:

{

id: 3

title: 'Mission: Impossible Fallout'

year: 2018

rating: 4.5

genres: 'Action|Spy|Thriller'

}

create the following routes:

GET:/: welcome screen that shows the user how to use the APIs

GET:/api/movies: return the full list of the movies (no sorting specified). this API can accept sorting queryStrings:

sort=title|year|ratingorder=asc|descexample:/api/movies?sort=title&order=ascdefault order isascGET:/api/movies/search?q=movieTitle: search for movies matches or partially matches the title

GET:/api/movies/:id: returns a movie byid

POST:/api/movies: insert a new movie submitted in the request body

PUT:/api/movies/:id: updates an existing movieidwith the submitted data in the request bodyDELETE:/api/movies/:id: deletes the movie byid

  • Uploaded By : Pooja Dhaka
  • Posted on : November 23rd, 2024
  • Downloads : 0
  • Views : 205

Download Solution Now

Can't find what you're looking for?

Whatsapp Tap to ChatGet instant assistance

Choose a Plan

Premium

80 USD
  • All in Gold, plus:
  • 30-minute live one-to-one session with an expert
    • Understanding Marking Rubric
    • Understanding task requirements
    • Structuring & Formatting
    • Referencing & Citing
Most
Popular

Gold

30 50 USD
  • Get the Full Used Solution
    (Solution is already submitted and 100% plagiarised.
    Can only be used for reference purposes)
Save 33%

Silver

20 USD
  • Journals
  • Peer-Reviewed Articles
  • Books
  • Various other Data Sources – ProQuest, Informit, Scopus, Academic Search Complete, EBSCO, Exerpta Medica Database, and more