express-resource
express-resource copied to clipboard
Resourceful routing for Express
Example map: thingsResource.map('get', '/:min/:max', thingsRouts.getMinMax) Min and max is float. I'm making 'get' request to url: things/12.22/12.45 or things/12.22/12.45/ I expected: req.params.min = 12.22 and req.params.max = 12.45, but i...
Suppose I've done something like: ``` javascript var users = { show: function(req, res){ //do something }, me: function(req, res){ //do something }, load : function(id, fn){ User.findById(id, fn); }...
I plan on either updating express-resource for express 3, or possibly writing a standalone resourceful router for express 3 in the meantime. What are your thoughts on an API like...
I noticed that `req.session` is undefined for resources but it works fine for manually added routes using `app.get` method ``` { lastAccess: 1329521660742, cookie: { path: '/', httpOnly: true, _expires:...
Just spent a bunch of time debugging what turned out to be caused by us reusing some code that said `req.params.id` for a non-top-level resource. IMHO, having the API change...
Currently express-resource uses the `:format` parameters for matching requested resource format (`.xml`, `.json`, etc). In addition to this, it would be nice to support the HTTP Accept headers. [connect-conneg](https://github.com/foxxtrot/connect-conneg) provides...
My usecase is as follows: I want my resource Ids/Names to be human readable, with all the special chars and dots they include. I do have a “champions/Dr. Mundo.png” Thanks...