et

effortlessness, et al.

et

effortlessness et al.

class Thing
 
    @get: (id) -> 
 
        the: 'route /things/:id was defined'
        because: 'the model defined get(id)'
        uTodo: "get thing:#{id} from db"
 
module.exports = Thing
app  = require('express')()
rest = require('et').Rest
 
app.use rest.config
    app: app
    models:
        things: require './thing'
 
app.listen 3000
$ coffee server
...
$ curl http://localhost:3001/things/1234

{ "the": "route /things/:id was defined", "because": "the model defined get(id)", "uTodo": "get thing:1234 from db" }

  • Added support for http GET to Ebb.Rest
  • Transparently plugin to express' routing