Skip to content

Commit

Permalink
Merge branch 'master' of github.com:1602/express-on-railway
Browse files Browse the repository at this point in the history
  • Loading branch information
1602 committed Dec 13, 2011
2 parents 894534e + edede32 commit d58b6d4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Expand Up @@ -177,6 +177,19 @@ and you can more finely tune the resources to specify certain actions, middlewar
});
};

since version 0.2.0 it is possible to use generic routes:

exports.routes = function (map) {
map.get(':controller/:action/:id');
map.all(':controller/:action');
};

if you have `custom_controller` with `test` action inside it you can now do:

GET /custom/test
POST /custom/test
GET /custom/test/1 // also sets params.id to 1

for debugging routes described in `config/routes.js` you can use `railway routes` command:

$ railway routes
Expand Down

0 comments on commit d58b6d4

Please sign in to comment.