Last active
December 18, 2018 11:16
-
-
Save evanxg852000/84d911e94cfcd3e8df2ada0007d17aed to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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