angular.module('app.config', []);

angular.module('app.config').factory('apiUrl', function($location) {
  // API Config
  var protocol = 'https' //$location.protocol();
  var host = 'aaa-drivinglaws-api.herokuapp.com' // $location.host();
  var port = 443; // $location.port();
  var fullApiUrl = function() {
    return protocol+"://"+host+":"+port+"/";
  };
  return fullApiUrl();
})

angular.module('app.config', []);

angular.module('app.config').factory('apiUrl', function($location) {
  // API Config
  var protocol = process.env.API_PROTOCOL || $location.protocol();
  var host = process.env.API_HOST || $location.host();
  var port = process.env.API_PORT || $location.port();
  var fullApiUrl = function() {
    return protocol+"://"+host+":"+port+"/";
  };
  return fullApiUrl();
})

Replace hardcoded api values with env variables
Replace hardcoded api values with env variables
