Express app.get()

app.get(path, callback [, callback …])

Routes HTTP GET requests to the specified path with the specified callback functions. For more information, see the routing guide.

You can provide multiple callback functions that behave just like middleware, except these callbacks can invoke next(‘route’) to bypass the remaining route callback(s). You can use this mechanism to impose pre-conditions on a route, then pass control to subsequent routes if there’s no reason to proceed with the current route.

// GET method route
app.get('/about', function (req, res) {
res.send('GET request to the homepage');
});

app.get()

第一个参数 是路由

这里部分大小写,也不会考虑传入的其他参数 。只要匹配就会执行后面的callback

这里可能匹配 /about /About /about/ /about?foo=bar 等

第一个参数也支持通配符 如 /about*