vectorouter, points URLs to desired callbacks, just like a good ol' vector should
To execute the sample code
npm start
To test the sample code
npm install npm test
Usage :
-
Require vectorouter
var vectorouter = require('./vectorouter');
-
Execute to get app instance
var app = vectorouter();
-
For Simple Middlewares
app.use(callback)
-
For Mounting Middleware to specific URL
app.use(url,callback)
-
For Plain routing
app."httpVerb"(url,callback) , for eg. app.get('/',foo);