Middlewares

One of the most powerful features available with Express is the concept of middleware. The idea behind middleware is that it acts like a stack of filters that every request to your server passes through. Every request passes through each filter and each filter can perform a specific task against the request before it passes through to the next filter.

To understand it better, here is a diagrammatic view of middlewares:

Typically, these filters are used for tasks such as cookie parsing, form-field handling, session handling, authentication, and error handling and logging. The list goes on and on. You can use hundreds of third-party modules as well as simply write your own custom middleware.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.81.201