node-restful
node-restful copied to clipboard
Expose CRUD operations
Expose common CRUD operations to user defined routes through
model = restful.model(...)
model.route('anotherget', {
detail: true,
handler: function(req, res, next) {
model.get(req.params.id, function(err, model) {..})
model.post(req.params.id, { data: value }, function(err, model) {..});
}
});
Stupid example, but this could be useful