O'Reilly logo
  • Patrick S thinks this is interesting:

For this, there’s a request.params object, which is an array with key/value pairs.

To experiment with the request.params object, we can add a new route to our ch7/request application. This route will define URL parameters and print them in the console. Add the following route to request/app.js:

app.get('/params/:role/:name/:status', function(req, res) {


Cover of Pro Express.js