How it works...
Express as a web server framework relies on a collection of Node.js modules that serve as middleware layers for our web application's backend. Middleware is simply a pattern for defining an asynchronous operation for a given request type. We will explore how to use and create our own middleware in the Creating Express middleware for routes section of this chapter.
For now, suffice to say that middleware are simply layers of operations on requests within your application, and Express provides a logical way to set the context and order of those layers in concert with the rest of your application. This compositional web server control is what makes Express such a powerful tool, despite its small size and simplicity.
By default, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access