socks-routes
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "socks-routes", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "A basic package for cleaning up some boilerplate behind express routes.", | ||
@@ -5,0 +5,0 @@ "main": "routes.js", |
@@ -33,3 +33,3 @@ # Socks-Routes | ||
// boilerplate, that specifies the route for `/` | ||
var router = require('socks-routes').Route('/'); | ||
var router = module.exports = require('socks-routes').Route('/'); | ||
@@ -36,0 +36,0 @@ // The rest is the same as express's default route skeleton |
@@ -14,2 +14,19 @@ /* Express route loader */ | ||
} | ||
all(...args) { | ||
console.log("Adding [ALL] "+(this.route=='/'?'':this.route)+args[0]); | ||
this.router['all'].apply(this.router, args); | ||
} | ||
param(...args) { | ||
this.router['param'].apply(this.router, args); | ||
} | ||
route(...args) { | ||
this.router['route'].apply(this.router, args); | ||
} | ||
use(...args) { | ||
this.router['use'].apply(this.router, args); | ||
} | ||
} | ||
@@ -16,0 +33,0 @@ |
4475
66