When you run Express apps for production, it is helpful to use a process manager to achieve the following tasks: Restart the app
res.download(path [, filename] [, fn]) Transfers the file at path as an “attachment”. Typically, browsers will prompt the user
req.query This property is an object containing a property for each query string parameter in the route. If there is no query string, it is
req.cookies When using cookie-parser middleware,
app.render(view, [locals], callback) Returns the rendered HTML of a view via the callback function. It accepts an optional parameter
req.route Contains the currently-matched route, a string. For example: app
req.path Contains the path part of the request URL. // example.com/users
res.set(field [, value]) Sets the response’s HTTP header field to value. To set multiple fields at once, pass an object
app.METHOD(path, callback [, callback ...]) Routes an HTTP request, where METHOD is the HTTP method of the request, such as GET, PUT, POST,
Use the app.engine(ext, callback) method to create your own template engine. ext refers to the file extension, and callback is the template
Page 9 of 11