lib/actions.js
function (program, callback) {
    var cozyLight = require('./cozy-light');

    applicationHelpers.resetDefaultPort();
    cozyLight.setStarted();

    // start app
    var app = express();
    var morgand = morgan('combined');
    if (expressLog) {
      app.use(morgand);
    }

    pluginHelpers.startAll(program, app, function(){
      mainAppHelper.start(app);
      applicationHelpers.startAll(function() {

        // always connect it after the proxy
        // https://github.com/nodejitsu/node-http-proxy/issues/180
        var jsonParser = bodyParser.json();
        var urlencodedParser = bodyParser.urlencoded({extended: false});
        app.use(urlencodedParser);
        app.use(jsonParser);
        nodeHelpers.invoke(callback, null, app, server);
      });
    });
  }
function (program, callback) {
    var cozyLight = require('./cozy-light');

    applicationHelpers.resetDefaultPort();
    cozyLight.setStarted();

    // start app
    var app = express();
    var morgand = morgan('combined');
    if (expressLog) {
      app.use(morgand);
    }

    pluginHelpers.startAll(program, app, function(){
      mainAppHelper.start(app);
      applicationHelpers.startAll(function() {

        // always connect it after the proxy
        // https://github.com/nodejitsu/node-http-proxy/issues/180
        var jsonParser = bodyParser.json();
        var urlencodedParser = bodyParser.urlencoded({extended: false});
        app.use(urlencodedParser);
        app.use(jsonParser);
        nodeHelpers.invoke(callback, null, app, server);
      });
    });
  }
function ( program , callback ) { var cozyLight = require ( './cozy-light' ) ; applicationHelpers . resetDefaultPort ( ) ; cozyLight . setStarted ( ) ; // start app var app = express ( ) ; var morgand = morgan ( 'combined' ) ; if ( expressLog ) { app . use ( morgand ) ; } pluginHelpers . startAll ( program , app , function ( ) { mainAppHelper . start ( app ) ; applicationHelpers . startAll ( function ( ) { // always connect it after the proxy // https://github.com/nodejitsu/node-http-proxy/issues/180 var jsonParser = bodyParser . json ( ) ; var urlencodedParser = bodyParser . urlencoded ( { extended : false } ) ; app . use ( urlencodedParser ) ; app . use ( jsonParser ) ; nodeHelpers . invoke ( callback , null , app , server ) ; } ) ; } ) ; }
Apply plugin customatisation on server. Then get all installed app
modules. Expect that a start function is available, then run the app
server on given port. Ports are expected to be available.

@param {Object} program The command line options.
@param {Function} callback Termination.
Apply plugin customatisation on server . Then get all installed app modules . Expect that a start function is available then run the app server on given port . Ports are expected to be available .