kieran / barista

A URL router / generator for NodeJS
https://kieran.github.io/barista/
MIT License
111 stars 22 forks source link

barista does not support a "bare" route #35

Closed katanacrimson closed 9 years ago

katanacrimson commented 9 years ago

As on tin. I'd expect that a router should be able to handle a "/" route, just for convenience's sake.

At the very least, I'll try to abuse .defer for now to get things working.

kieran commented 9 years ago

You can do this:

router.get '/'
.to 'Main.index'
.as 'home'

Example: screen shot 2015-03-20 at 11 27 09 pm

Does that work for you?

P.S. You can play around with barista here: http://kieran.github.io/barista/