stick icon indicating copy to clipboard operation
stick copied to clipboard

Implement route() function

Open botic opened this issue 11 years ago • 0 comments

Implement a route function to make something like this (new in Express 4.0) possible:

app.route('/myroute')
.all(function(req) {
  // runs for all HTTP verbs first
  // think of it as route specific middleware!
})
.get(function(req) {
  return response.json({});
})
.post(function(req) {
  // some code
});

botic avatar Mar 17 '14 15:03 botic