req.protocol
  • References/JavaScript/Express/Request

req.protocol Contains the request protocol string: either http or (for TLS requests) https. When

2025-01-10 15:47:30
res.sendStatus()
  • References/JavaScript/Express/Response

res.sendStatus(statusCode) Sets the response HTTP status code to statusCode and send its string representation as the response

2025-01-10 15:47:30
FAQ
  • References/JavaScript/Express/Getting started

How should I structure my application? There is no definitive answer to this question. The answer

2025-01-10 15:47:30
router.all()
  • References/JavaScript/Express/Router

router.all(path, [callback, ...] callback) This method is just like the router.METHOD() methods, except that it matches all HTTP

2025-01-10 15:47:30
res.locals
  • References/JavaScript/Express/Response

res.locals An object that contains response local variables scoped to the request, and therefore available only to the view(s) rendered during

2025-01-10 15:47:30
express.Router()
  • References/JavaScript/Express/express()

express.Router([options]) Creates a new router object. var router

2025-01-10 15:47:30
res.vary()
  • References/JavaScript/Express/Response

res.vary(field) Adds the field to the Vary response header, if it is not there already.

2025-01-10 15:47:30
req.accepts()
  • References/JavaScript/Express/Request

req.accepts(types) Checks if the specified content types are acceptable, based on the request’s Accept HTTP header field. The method

2025-01-10 15:47:30
router.param()
  • References/JavaScript/Express/Router

router.param(name, callback) Adds callback triggers to route parameters, where name is the name of the parameter and callback

2025-01-10 15:47:30
router.METHOD()
  • References/JavaScript/Express/Router

router.METHOD(path, [callback, ...] callback) The router.METHOD() methods provide the routing functionality in Express, where METHOD

2025-01-10 15:47:30