CHAPTER 6

image

Parameters and Routing

To review, the typical structure of an Express.js app (which is usually a server.js or app.js file) roughly consists of these parts, in the order shown:

  1. Dependencies: A set of statements to import dependencies
  2. Instantiations: A set of statements to create objects
  3. Configurations: A set of statements to configure system and custom settings
  4. Middleware: A set of statements that is executed for every incoming request
  5. Routes: A set of statements that defines server routes, endpoints, and pages
  6. Bootup: A set of statements that starts the server and makes it listen on a specific port for incoming requests

This chapter ...

Get Pro Express.js now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.