Skip to content

Instantly share code, notes, and snippets.

@evanxg852000
Last active December 18, 2018 11:16
Show Gist options
  • Save evanxg852000/84d911e94cfcd3e8df2ada0007d17aed to your computer and use it in GitHub Desktop.
Save evanxg852000/84d911e94cfcd3e8df2ada0007d17aed to your computer and use it in GitHub Desktop.
router.get('/chain/example', [
(req, res, next) => {
req.chain = 'one ->'
next()
},
(req, res, next) => {
req.chain = `${ req.chain} two ->`
next()
},
(req, res, next) => {
res.end(`${req.chain} three`)
// next -> udefined thus cannot be called
}
]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment