flatiron/director — Issue #84: .on method
Author: dscape
Created: 2012-03-09 21:04:09+00:00
State: open

I used this method before in sugarskull, but seems to be missing

``` js
var flatiron = require('flatiron')
, app = flatiron.app
;

app.use(flatiron.plugins.http);

app.router.on('/bla', function () {
this.res.json({"error": "not_found"}, 404);
});

app.start(3001, function () {
console.log({"nodejitsu": "ok", "port": 3001});
});
```

```
$ curl localhost:3000/bla/
undefined
```