v0.13.0
- Introducing the app.resource(path) class for grouping methods - inner functionality inspired by @luisvinicius167 's diet-group-router #32
Now you can do:
app.resource('/user/:id?')
.get(function($){ $.end('GET user ' + $.params.id) })
.post(function($){ $.end('POST user ' + $.params.id) })
.put(function($){ $.end('PUT user ' + $.params.id) })
.delete(function($){ $.end('DELETE user ' + $.params.id) })