This method is like the standard app.METHOD() methods, except it matches all HTTP verbs.
This method is like the standard app.METHOD() methods, except it matches all HTTP verbs. It’s useful for mapping “global” logic for specific path prefixes or arbitrary matches. For example, if you put the following at the top of all other route definitions, it requires that all routes from that point on require authentication, and automatically load a user. Keep in mind that these callbacks do not have to act as end-points: loadUser can perform a task, then call next() to continue matching subsequent routes
app.all(path, callback [, callback ...])
Routes HTTP CONNECT requests to the specified path with the specified callback functions.
Routes HTTP CONNECT requests to the specified path with the specified callback functions. For more information, see the routing guide.
app.connect(path, callback [, callback ...])
Routes HTTP DELETE requests to the specified path with the specified callback functions.
Routes HTTP DELETE 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.
app.delete(path, callback [, callback ...])
Routes HTTP GET requests to the specified path with the specified callback functions.
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.
app.get(path, callback [, callback ...])
Routes HTTP HEAD requests to the specified path with the specified callback functions.
Routes HTTP HEAD requests to the specified path with the specified callback functions. For more information, see the routing guide.
app.head(path, callback [, callback ...])
Routes HTTP OPTIONS requests to the specified path with the specified callback functions.
Routes HTTP OPTIONS requests to the specified path with the specified callback functions. For more information, see the routing guide.
app.options(path, callback [, callback ...])
Add callback triggers to route parameters, where name is the name of the parameter or an array of them, and callback is the callback function.
Add callback triggers to route parameters, where name is the name of the parameter or an array of them, and callback is the callback function. The parameters of the callback function are the request object, the response object, the next middleware, the value of the parameter and the name of the parameter, in that order.
If name is an array, the callback trigger is registered for each parameter declared in it, in the order in which they are declared. Furthermore, for each declared parameter except the last one, a call to next inside the callback will call the callback for the next declared parameter. For the last parameter, a call to next will call the next middleware in place for the route currently being processed, just like it would if name were just a string.
app.param([name], callback)
Routes HTTP PATCH requests to the specified path with the specified callback functions.
Routes HTTP PATCH requests to the specified path with the specified callback functions. For more information, see the routing guide.
app.patch(path, callback [, callback ...])
Routes HTTP POST requests to the specified path with the specified callback functions.
Routes HTTP POST 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 that 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.
app.post(path, callback [, callback ...])
Routes HTTP PUT requests to the specified path with the specified callback functions.
Routes HTTP PUT 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 that 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.
app.put(path, callback [, callback ...])
Routes HTTP TRACE requests to the specified path with the specified callback functions.
Routes HTTP TRACE requests to the specified path with the specified callback functions. For more information, see the routing guide.
app.trace(path, callback [, callback ...])
A router object is an isolated instance of middleware and routes. You can think of it as a “mini-application,” capable only of performing middleware and routing functions. Every Express application has a built-in app router.
A router behaves like middleware itself, so you can use it as an argument to app.use() or as the argument to another router’s use() method.
The top-level express object has a Router() method that creates a new router object.
http://expressjs.com/en/4x/api.html#router