simple-controllers

Add to Express a simple controllers management.

simple-controllers

Add to Express a simple controllers management.

// 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);