lib/cligen.js
function runWebServerInProcess(rawConfig, serverConfig, emitter) {
  var server = require('./server.js');
  
  if (serverConfig.command == 'stop') {
    logger.info('stopping server');
    return server.stop();
  }
  
  var app = server.listen(rawConfig, serverConfig, function(err, newCommandName, newConfig, finalCallback) {
    if (err) { 
      logger.error("Error: " + err);
      if (callback) callback(err);
    } else {
      emitter.emit(newCommandName, newConfig, finalCallback);
    }
  });
}
function runWebServerInProcess(rawConfig, serverConfig, emitter) {
  var server = require('./server.js');
  
  if (serverConfig.command == 'stop') {
    logger.info('stopping server');
    return server.stop();
  }
  
  var app = server.listen(rawConfig, serverConfig, function(err, newCommandName, newConfig, finalCallback) {
    if (err) { 
      logger.error("Error: " + err);
      if (callback) callback(err);
    } else {
      emitter.emit(newCommandName, newConfig, finalCallback);
    }
  });
}
function runWebServerInProcess ( rawConfig , serverConfig , emitter ) { var server = require ( './server.js' ) ; if ( serverConfig . command == 'stop' ) { logger . info ( 'stopping server' ) ; return server . stop ( ) ; } var app = server . listen ( rawConfig , serverConfig , function ( err , newCommandName , newConfig , finalCallback ) { if ( err ) { logger . error ( "Error: " + err ) ; if ( callback ) callback ( err ) ; } else { emitter . emit ( newCommandName , newConfig , finalCallback ) ; } } ) ; }
Runs the web server in the same process as the user's code.  This is quicker for a single
cpu, but risks the user's code stealing cpu and preventing the web server from serving
responses in a timely fashion
Runs the web server in the same process as the user s code . This is quicker for a single cpu but risks the user s code stealing cpu and preventing the web server from serving responses in a timely fashion