lib/http/mvc/loader.js
function(map, callback) {

            // Walk through all modules in parallel
            async.map(map, function(module, callback) {

                logger.info('Loading ' + (module.name).blue + ' module');

                // Walk through all possible controllers of the module
                async.map(module.paths, function(path, callback) {

                    self.loadController(
                        path,
                        basename(path.replace(/\.js$/g, '')),
                        module.name,
                        callback
                    );

                }, function(err, controllers) {
                    module.controllers = controllers;
                    callback(err, module);
                });

            }, callback);
        }
function(map, callback) {

            // Walk through all modules in parallel
            async.map(map, function(module, callback) {

                logger.info('Loading ' + (module.name).blue + ' module');

                // Walk through all possible controllers of the module
                async.map(module.paths, function(path, callback) {

                    self.loadController(
                        path,
                        basename(path.replace(/\.js$/g, '')),
                        module.name,
                        callback
                    );

                }, function(err, controllers) {
                    module.controllers = controllers;
                    callback(err, module);
                });

            }, callback);
        }
function ( map , callback ) { // Walk through all modules in parallel async . map ( map , function ( module , callback ) { logger . info ( 'Loading ' + ( module . name ) . blue + ' module' ) ; // Walk through all possible controllers of the module async . map ( module . paths , function ( path , callback ) { self . loadController ( path , basename ( path . replace ( / \.js$ / g , '' ) ) , module . name , callback ) ; } , function ( err , controllers ) { module . controllers = controllers ; callback ( err , module ) ; } ) ; } , callback ) ; }
Load controllers of the modules
Load controllers of the modules