Add routes
A really Basic example
// Possible path: #about
router.get('/about', function(vars, request, path) {
});// Possible path: #about/contact
router.get('/about/contact', function(vars, request, path) {
});Using Regular Expressions
// Possible path: #about/location/stockholm
router.get('/about/location/{[a-z]+}', function(vars, request, path) {
});Binding Router Patterns to a Key
// Possible path: #about/location/stockholm
router.get('/{page:about}/location/{city:[^/]+}', function(vars, request, path) {
//vars.page[0] is expected to be "about"
//vars.city[0] is expected to be any string value (stockholm, denmark, new-york) from passed URI.
});Combining pattern with keywords
Handling Unlimited Nested Paths
Optional URI Paths
Catch status errors
Last updated