node-restful
node-restful copied to clipboard
before and after filters for multiple routes/whole resources
Set up a before/after route for the entire resource or path in resource. i.e.
model = restful.model(..);
model.before('*', function(req, res, next) {..});
model.before('path.*', function(req, res, next) {});
model.before('path.*', ['get', 'post'], function(req, res, next) {});
Can do this using express's wildcard routing fairly easily but the internal representation is harder