Skip to content

Instantly share code, notes, and snippets.

@bouchtaoui-dev
Created January 16, 2019 10:52
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/9348dce1fd6d7d3ebe47e17b2efb0b5d to your computer and use it in GitHub Desktop.
Save bouchtaoui-dev/9348dce1fd6d7d3ebe47e17b2efb0b5d to your computer and use it in GitHub Desktop.
var cb0 = function (req, res, next) {
console.log('CB0')
next() // don't forget to call next()!
}
var cb1 = function (req, res, next) {
console.log('CB1')
next() // don't forget to call next()!
}
var cb2 = function (req, res) {
res.send('Hello from C!')
}
// pass the handlers as an array
route.get('/example/c', [cb0, cb1, cb2])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment