simple-controllers
v0.5.5
Published
Add to Express a simple controllers management.
Downloads
15
Readme
simple-controllers
Add to Express a simple controllers management.
Example
// filename: app.js
...
var controllers = require('simple-controllers);
...
app.configure(function() {
...
// Specify the path of the controllers
app.set('controllers', __dirname + '/controllers');
...
});
var auth_func = function(req, res, next) {
...
next();
}
...
var result = app.controllers(auth_func);
console.dir(result);