lib/jitsu/commands/apps.js
function setCloud(app) {
    drones = drones || app.maxDrones;
    ram = ram || (app.config.cloud ? app.config.cloud[0].ram : 256);

    var cloud = {
      datacenter: datacenter,
      provider: provider,
      drones: drones,
      ram: ram
    };

    if (app.state === 'started') {
      jitsu.log.info('App currently deployed to the cloud with:')
      jitsu.inspect.putObject(app.config.cloud[0]);
    }

    jitsu.log.info('Deploying application to the cloud with:')
    jitsu.inspect.putObject(cloud);

    async.series({
      //
      // 1. Fetch the endpoints so that we can properly
      //    tell the user what datacenter they are in later.
      //
      endpoints: function getEndpoints(next) {
        jitsu.apps.endpoints(next);
      },
      //
      // 2. Start the app with the specified cloud information.
      //
      start: function start(next) {
        jitsu.apps.datacenter(name, cloud, next);
      }
    }, function (err, result) {
      if (err) {
        jitsu.log.error('Error starting ' + name.magenta);
        return callback(err);
      }

      var endpoints = result.endpoints,
          tld = result.endpoints[provider][datacenter];

      jitsu.log.info('App ' + name.magenta + ' is now started');
      jitsu.log.info(('http://' + app.subdomain + tld.replace('api', '')).magenta + ' on Port ' + '80'.magenta);
      callback(null, app);
    });
  }
function setCloud(app) {
    drones = drones || app.maxDrones;
    ram = ram || (app.config.cloud ? app.config.cloud[0].ram : 256);

    var cloud = {
      datacenter: datacenter,
      provider: provider,
      drones: drones,
      ram: ram
    };

    if (app.state === 'started') {
      jitsu.log.info('App currently deployed to the cloud with:')
      jitsu.inspect.putObject(app.config.cloud[0]);
    }

    jitsu.log.info('Deploying application to the cloud with:')
    jitsu.inspect.putObject(cloud);

    async.series({
      //
      // 1. Fetch the endpoints so that we can properly
      //    tell the user what datacenter they are in later.
      //
      endpoints: function getEndpoints(next) {
        jitsu.apps.endpoints(next);
      },
      //
      // 2. Start the app with the specified cloud information.
      //
      start: function start(next) {
        jitsu.apps.datacenter(name, cloud, next);
      }
    }, function (err, result) {
      if (err) {
        jitsu.log.error('Error starting ' + name.magenta);
        return callback(err);
      }

      var endpoints = result.endpoints,
          tld = result.endpoints[provider][datacenter];

      jitsu.log.info('App ' + name.magenta + ' is now started');
      jitsu.log.info(('http://' + app.subdomain + tld.replace('api', '')).magenta + ' on Port ' + '80'.magenta);
      callback(null, app);
    });
  }
function setCloud ( app ) { drones = drones || app . maxDrones ; ram = ram || ( app . config . cloud ? app . config . cloud [ 0 ] . ram : 256 ) ; var cloud = { datacenter : datacenter , provider : provider , drones : drones , ram : ram } ; if ( app . state === 'started' ) { jitsu . log . info ( 'App currently deployed to the cloud with:' ) jitsu . inspect . putObject ( app . config . cloud [ 0 ] ) ; } jitsu . log . info ( 'Deploying application to the cloud with:' ) jitsu . inspect . putObject ( cloud ) ; async . series ( { // // 1. Fetch the endpoints so that we can properly //    tell the user what datacenter they are in later. // endpoints : function getEndpoints ( next ) { jitsu . apps . endpoints ( next ) ; } , // // 2. Start the app with the specified cloud information. // start : function start ( next ) { jitsu . apps . datacenter ( name , cloud , next ) ; } } , function ( err , result ) { if ( err ) { jitsu . log . error ( 'Error starting ' + name . magenta ) ; return callback ( err ) ; } var endpoints = result . endpoints , tld = result . endpoints [ provider ] [ datacenter ] ; jitsu . log . info ( 'App ' + name . magenta + ' is now started' ) ; jitsu . log . info ( ( 'http://' + app . subdomain + tld . replace ( 'api' , '' ) ) . magenta + ' on Port ' + '80' . magenta ) ; callback ( null , app ) ; } ) ; }
1. Print what cloud app is deployed in now. 2. Print new cloud app will be deployed to. 3. Start the app in the specified cloud.
1 . Print what cloud app is deployed in now . 2 . Print new cloud app will be deployed to . 3 . Start the app in the specified cloud .