Express.js Fundamentals - 6 - Middleware Explained

Publicado el: 26 diciembre 2015
en el canal de: JsWiz
51,652
728

Projects in Node.js: https://goo.gl/rT7o2k

In this video we'll go more into detail what Middleware means and provide some examples.

We can define middleware as any number of functions that are invoked by the Express.js routing layer before your final request handler is made.

So essentially we're saying, on our defined route Do Something first, then pass it along to the next function. Each time we will use the request/response objects of an HTTP cycle to Alter, End or pass to Next whatever it is we're handling.

In this example before sending someone to the route they request we would deal any CORS or CSRF issues that may arise, we'd check to see if the user was authorized and if all is good, then we would send them to where they want to go.


En esta página del sitio puede ver el video en línea Express.js Fundamentals - 6 - Middleware Explained de Duración hora minuto segunda en buena calidad , que subió el usuario JsWiz 26 diciembre 2015, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 51,652 veces y le gustó 728 a los espectadores. Disfruta viendo!