Skip to content

Commit

Permalink
Changes some CONSTANTS to location.origin
Browse files Browse the repository at this point in the history
  • Loading branch information
RotaruDan committed Jan 22, 2016
1 parent 3f1083b commit 76b5725
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/public/js/env-vars-example.js
Expand Up @@ -3,8 +3,8 @@
var envVars = angular.module('env-vars', []);

envVars.constant('CONSTANTS', {
APIPATH: location.protocol + '//' + location.hostname + ':3000/api',
APIPATH: location.origin + '/api',
PREFIX: '{{appPrefix}}',
PROXY: location.protocol + '//' + location.hostname + ':3000/api/proxy/{{appPrefix}}'
PROXY: location.origin + '/api/proxy/{{appPrefix}}'
});

3 changes: 1 addition & 2 deletions test/configs.js
Expand Up @@ -68,8 +68,7 @@ describe('Config files validations', function () {

it('should have generated a correct env-vars file', function (done) {
global.location = {
protocol: 'http:',
hostname: 'localhost'
origin: 'http://localhost:3000'
};
global.angular = {
module: function(moduleName, moduleArgs) {
Expand Down

0 comments on commit 76b5725

Please sign in to comment.