src/client/factory.js
function getConfigFromBrowser() {
  var defaultLocation = {
    port: '80',
    hostname: 'localhost',
    protocol: 'http:'
  };

  var wLocation = (global.location)
    ? global.location
    : defaultLocation;

  var location = {
    port: wLocation.port,
    host: wLocation.protocol + '//' + wLocation.hostname
  };

  var config = {
    port: location.port,
    host: location.host,
    errorHandlers: []
  };

  return config;
}
function getConfigFromBrowser() {
  var defaultLocation = {
    port: '80',
    hostname: 'localhost',
    protocol: 'http:'
  };

  var wLocation = (global.location)
    ? global.location
    : defaultLocation;

  var location = {
    port: wLocation.port,
    host: wLocation.protocol + '//' + wLocation.hostname
  };

  var config = {
    port: location.port,
    host: location.host,
    errorHandlers: []
  };

  return config;
}
function getConfigFromBrowser ( ) { var defaultLocation = { port : '80' , hostname : 'localhost' , protocol : 'http:' } ; var wLocation = ( global . location ) ? global . location : defaultLocation ; var location = { port : wLocation . port , host : wLocation . protocol + '//' + wLocation . hostname } ; var config = { port : location . port , host : location . host , errorHandlers : [ ] } ; return config ; }
Gets the default configuration based on environmental variables
@return {Object}  Initial config
Gets the default configuration based on environmental variables