June 2025
Intermediate to advanced
837 pages
24h 50m
English
Currently, your movie database works with several HTML templates and view structures. You can delete them at this point because a REST interface doesn’t use HTML and usually uses other formats instead, such as JSON or XML, to format the resources. Specifically, this means that you can delete the following from the movie directory: the views directory and the form.js and view.js files. The templates and public directories as well as the auth.js file in the root directory of the application are also no longer needed at this point. Furthermore, you must customize the initial file of your application as shown in Listing 10.2.
import express from 'express';import morgan from 'morgan';import { router ...
Read now
Unlock full access