Last active
January 16, 2019 10:50
-
-
Save bouchtaoui-dev/59136d7e6118c95933d9c282034007e3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// route handler with 2 handlers | |
route.get('/example/b', function (req, res, next) { // handler 1 | |
console.log('the response will be sent by the next function ...') | |
next() // don't forget to call next() for passing control to the nex callback | |
}, function (req, res) { // handler 2 | |
res.send('Hello from B!') | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment