waypoint
Version:
Waypoint provides browser and server side routing
18 lines (14 loc) • 313 B
JavaScript
// Server side tests
// Run with: "node node.js"
var assert = require('assert'),
Waypoint = require('../lib/waypoint');
var router = new Router({
'routes' : [
new Route('/home/:a', function (a) {
console.log('root', a);
})
],
'notFound' : function () {
console.log('No route was matched');
}
});