Wrap Up

Let's highlight the main contents of this section.

We'll cover the following

Key takeaways

Let’s take a moment to reflect on what we’ve learned in this section:

  • Express is minimalistic and provides a lightweight abstraction over the Node.js HTTP modules. It also provides convenience methods for creating routing, views, and middleware.

  • Node Package Manager (npm) is the world’s largest JavaScript software registry. It also refers to the command-line interface (CLI) tool for downloading and managing Node.js packages.

  • Middleware functions are functions that alter the request (req) and response (res) objects in the application’s request-response cycle, which is New HTTP Request \rightarrow Middleware Functions \rightarrow Route Handlers.

  • REST is a popular architectural convention for structuring and naming APIs using a standardized protocol, such as the HTTP standard. A RESTful API based on the HTTP standard leverages five main HTTP methods (GET, PUT, POST, PATCH, and DELETE) to retrieve and manipulate data. Each method corresponds to a CRUD operation. A RESTful API can support various data formats, such as XML and JSON.

  • The express.Router class can be used to create modular route handlers, with each router instance being responsible for handling routing for a specific resource, recipes, in the backend.

Get hands-on with 1400+ tech skills courses.