Express.js Fundamentals - 6 - Middleware Explained

Publicado em: 26 Dezembro 2015
no 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.


Nesta página do site você pode assistir ao vídeo on-line Express.js Fundamentals - 6 - Middleware Explained duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário JsWiz 26 Dezembro 2015, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 51,652 vezes e gostou 728 espectadores. Boa visualização!