stick
stick copied to clipboard
Implement route() function
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
});