Created
July 8, 2014 06:29
-
-
Save youxiachai/e2bba835c2ef4850562b to your computer and use it in GitHub Desktop.
express 中间件匹配用法..,注意位置!
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
app.use('/fsck', function (req, res, next){ | |
console.log('fsck'); | |
res.header("How-Old-Are-You", "Iamfinethinkyou"); | |
next(); | |
}) | |
app.get('/fsck/fsck', function (res, res){ | |
console.log('fsck'); | |
res.send('ok') | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
测试 curl -I host/fsck/fsck