Skip to content

Tag Archives: Express.js

The router.route() function returns an instance of a single route that you can then use to handle HTTP verbs with optional middleware. You can also… Read More
The req.fresh property returns true if the response is still ‘fresh’ in the client’s cache else it will return false. Syntax: req.fresh Parameter: No parameter… Read More
The res.sendStatus() function is used to set the response HTTP status code to statusCode and send its string representation as the response body.Syntax:  res.sendStatus( statusCode… Read More
The req.query property is an object containing the property for each query string parameter in the route. Syntax: req.query Parameter: No parameters. Return Value: String… Read More
The res.headersSent property is a boolean property that indicates if the app sent HTTP headers for the response. Syntax: res.headersSent Parameter: No parameters. Return Value:… Read More
The req.route property contains the currently-matched route which is a string. Syntax: req.route Parameter: No parameters. Return Value: Object Installation of express module: You can… Read More
The req.body property contains key-value pairs of data submitted in the request body. By default, it is undefined and is populated when you use a… Read More
The req.signedCookies property contains signed cookies sent by the request, unsigned, and ready for use when using cookie-parser middleware. Syntax: req.signedCookies Parameter: No parameter Return… Read More
The res.locals property is an object that contains response local variables scoped to the request and because of this, it is only available to the… Read More
The property holds the reference to the instance of the Express application that is using the middleware. Syntax: Parameter: No parameters. Return Value:… Read More
The req.cookies property is used when the user is using cookie-parser middleware. This property is an object that contains cookies sent by the request. Syntax:… Read More
The req.path property contains the path of the request URL. This property is widely used to get the path part of the incoming request URL.… Read More
The res.redirect() function redirects to the URL derived from the specified path, with specified status, a integer (positive) which corresponds to an HTTP status code.… Read More
The res.render() function is used to render a view and sends the rendered HTML string to the client.  Syntax:  res.render(view [, locals] [, callback]) Parameters:… Read More
The req.method property contains a string corresponding to the HTTP method of the request which can be either GET, POST, PUT, DELETE, etc. Syntax: req.method… Read More

Start Your Coding Journey Now!