lib/server.js
function BartererServer(options) {
  options = options || {};
  var specifiedHttpPort = options.httpPort || HTTP_PORT;
  var httpPort = process.env.PORT || specifiedHttpPort;

  var app = express();

  var instance = new Barterer(options);
  options.app = app;
  instance.configureRoutes(options);

  app.listen(httpPort, function() {
    console.log('barterer is listening on port', httpPort);
  });

  return instance;
}
function BartererServer(options) {
  options = options || {};
  var specifiedHttpPort = options.httpPort || HTTP_PORT;
  var httpPort = process.env.PORT || specifiedHttpPort;

  var app = express();

  var instance = new Barterer(options);
  options.app = app;
  instance.configureRoutes(options);

  app.listen(httpPort, function() {
    console.log('barterer is listening on port', httpPort);
  });

  return instance;
}
function BartererServer ( options ) { options = options || { } ; var specifiedHttpPort = options . httpPort || HTTP_PORT ; var httpPort = process . env . PORT || specifiedHttpPort ; var app = express ( ) ; var instance = new Barterer ( options ) ; options . app = app ; instance . configureRoutes ( options ) ; app . listen ( httpPort , function ( ) { console . log ( 'barterer is listening on port' , httpPort ) ; } ) ; return instance ; }
BartererServer Class
Server for barterer, returns an instance of barterer with its own Express
server listening on the given port.
@param {Object} options The options as a JSON object.
@constructor
BartererServer Class Server for barterer returns an instance of barterer with its own Express server listening on the given port .