scripts/controllers/AppsController.js
function(req, res, next) {

        /**
         * If you want to redirect to another controller, uncomment
         */

        var controllers = [];

        fs.readdir(__dirname + '/', function(err, files) {

            if (err) {
                throw err;
            }
            files.forEach(function(file) {
                if(/\.js$/i.test(file)) {
                   if (file !== "AppsController.js") {
                       controllers.push(file.replace('Controller.js', '').toLowerCase());
                   }
                }
            });

            res.render('app', {
                controllers: controllers
            });

        });
    }
function(req, res, next) {

        /**
         * If you want to redirect to another controller, uncomment
         */

        var controllers = [];

        fs.readdir(__dirname + '/', function(err, files) {

            if (err) {
                throw err;
            }
            files.forEach(function(file) {
                if(/\.js$/i.test(file)) {
                   if (file !== "AppsController.js") {
                       controllers.push(file.replace('Controller.js', '').toLowerCase());
                   }
                }
            });

            res.render('app', {
                controllers: controllers
            });

        });
    }
function ( req , res , next ) { /**
         * If you want to redirect to another controller, uncomment
         */ var controllers = [ ] ; fs . readdir ( __dirname + '/' , function ( err , files ) { if ( err ) { throw err ; } files . forEach ( function ( file ) { if ( / \.js$ / i . test ( file ) ) { if ( file !== "AppsController.js" ) { controllers . push ( file . replace ( 'Controller.js' , '' ) . toLowerCase ( ) ) ; } } } ) ; res . render ( 'app' , { controllers : controllers } ) ; } ) ; }
Default Application index - shows a list of the controllers.
Redirect here if you prefer another controller to be your index.
@param req
@param res
@param next
Default Application index - shows a list of the controllers . Redirect here if you prefer another controller to be your index .