1/*
2Some people always write return next() is to ensure that the execution stops after triggering the callback.
3
4If you don't do it, you risk triggering the callback a second time later, which usually has devastating results.
5*/
6
7app.get('/users/:id?', function(req, res, next){
8 var id = req.params.id;
9
10 if(!id)
11 return next();
12
13 // do something
14});
15
16