mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-24 11:50:59 +08:00
Add more tests
This commit is contained in:
1 parent
43f1770f23
commit
e039638763
1 file changed
+15
@@ -18,4 +18,19 @@ app.get('/', function(req, res){
|
||||
res.send('hello world');
|
||||
});
|
||||
|
||||
var router = express.Router();
|
||||
|
||||
router.use((req, res, next) => { next(); })
|
||||
router.route('/users')
|
||||
.get((req, res, next) => {
|
||||
res.send(req.query['token']);
|
||||
});
|
||||
|
||||
app.use((req, res, next) => {
|
||||
// hacky trick, router is just a handler
|
||||
router(req, res, next);
|
||||
});
|
||||
|
||||
app.use(router);
|
||||
|
||||
app.listen(3000);
|
||||
Reference in new issue
Block a user