Created
January 16, 2019 10:52
-
-
Save bouchtaoui-dev/9348dce1fd6d7d3ebe47e17b2efb0b5d 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
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