Skip to content

Instantly share code, notes, and snippets.

@bouchtaoui-dev
Last active January 16, 2019 10:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bouchtaoui-dev/59136d7e6118c95933d9c282034007e3 to your computer and use it in GitHub Desktop.
Save bouchtaoui-dev/59136d7e6118c95933d9c282034007e3 to your computer and use it in GitHub Desktop.
// 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