milani/appjs — pull request #66 by Takeno (2012-06-24 12:57:46+00:00)
Title: Router Upgrade

Hi!

I rewrote the router of appjs using some methods of ExpressJs router lib, merging them with your code.
The new features are:
- Wildcard/Params in url request (like: '/user/:id' => req.params.id)
- method res.sendFile() to send static file not only in GET requests
- new app.use() method to add "extensions" that may manipulate req/res before "view" callback

I propose also a new order for middleware executions:
* 1^ Global Handlers => function(req, res, next) which is run every request
* 2^ Method Handlers => function(req, res, next) which is run only in specified method request
* 3^ Route Handler => the last function(req, res) which is run only if route match the pathname

PS: I found this lib: http://tempojs.com/ . Can be useful integrate it in appjs?

This is my first pull request, so be careful for my possible errors.
I hope this can help the project.

... and sorry for my terrible english! :(