req.protocol Contains the request protocol string: either http or (for TLS requests) https. When
res.sendStatus(statusCode) Sets the response HTTP status code to statusCode and send its string representation as the response
How should I structure my application? There is no definitive answer to this question. The answer
router.all(path, [callback, ...] callback) This method is just like the router.METHOD() methods, except that it matches all HTTP
res.locals An object that contains response local variables scoped to the request, and therefore available only to the view(s) rendered during
express.Router([options]) Creates a new router object. var router
res.vary(field) Adds the field to the Vary response header, if it is not there already.
req.accepts(types) Checks if the specified content types are acceptable, based on the request’s Accept HTTP header field. The method
router.param(name, callback) Adds callback triggers to route parameters, where name is the name of the parameter and callback
router.METHOD(path, [callback, ...] callback) The router.METHOD() methods provide the routing functionality in Express, where METHOD
Page 6 of 11