fixed socketURL bug
This commit is contained in:
parent
efe1bee190
commit
567e876cfd
1
config/env/all.js
vendored
1
config/env/all.js
vendored
|
@ -21,6 +21,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
|
|
||||||
port: process.env.PORT || 3000,
|
port: process.env.PORT || 3000,
|
||||||
|
socketPort: process.env.SOCKET_PORT || 20523,
|
||||||
|
|
||||||
templateEngine: 'swig',
|
templateEngine: 'swig',
|
||||||
|
|
||||||
|
|
1
config/env/development.js
vendored
1
config/env/development.js
vendored
|
@ -9,7 +9,6 @@ module.exports = {
|
||||||
pass: ''
|
pass: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
socketPort: process.env.SOCKET_PORT || 20523,
|
|
||||||
|
|
||||||
log: {
|
log: {
|
||||||
// Can specify one of 'combined', 'common', 'dev', 'short', 'tiny'
|
// Can specify one of 'combined', 'common', 'dev', 'short', 'tiny'
|
||||||
|
|
6
public/dist/form-application.js
vendored
6
public/dist/form-application.js
vendored
|
@ -1210,10 +1210,12 @@ angular.module('view-form').factory('Forms', ['$resource', 'VIEW_FORM_URL',
|
||||||
};
|
};
|
||||||
|
|
||||||
var url = '';
|
var url = '';
|
||||||
|
console.log("$window.socketPort: "+$window.socketPort);
|
||||||
|
console.log("$window.socketUrl: "+$window.socketUrl);
|
||||||
if($window.socketPort && $window.socketUrl){
|
if($window.socketPort && $window.socketUrl){
|
||||||
url = $window.socketUrl + ':' + $window.socketPort;
|
url = window.location.protocol + '//' + $window.socketUrl + ':' + $window.socketPort;
|
||||||
} else if ($window.socketUrl && !$window.socketUrl){
|
} else if ($window.socketUrl && !$window.socketUrl){
|
||||||
url = $window.socketUrl;
|
url = window.location.protocol + '//' + $window.socketUrl;
|
||||||
} else if ($window.socketPort){
|
} else if ($window.socketPort){
|
||||||
url = window.location.protocol + '//' + window.location.hostname + ':' + $window.socketPort;
|
url = window.location.protocol + '//' + window.location.hostname + ':' + $window.socketPort;
|
||||||
} else {
|
} else {
|
||||||
|
|
2
public/dist/form-application.min.js
vendored
2
public/dist/form-application.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -18,10 +18,12 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
var url = '';
|
var url = '';
|
||||||
|
console.log("$window.socketPort: "+$window.socketPort);
|
||||||
|
console.log("$window.socketUrl: "+$window.socketUrl);
|
||||||
if($window.socketPort && $window.socketUrl){
|
if($window.socketPort && $window.socketUrl){
|
||||||
url = $window.socketUrl + ':' + $window.socketPort;
|
url = window.location.protocol + '//' + $window.socketUrl + ':' + $window.socketPort;
|
||||||
} else if ($window.socketUrl && !$window.socketUrl){
|
} else if ($window.socketUrl && !$window.socketUrl){
|
||||||
url = $window.socketUrl;
|
url = window.location.protocol + '//' + $window.socketUrl;
|
||||||
} else if ($window.socketPort){
|
} else if ($window.socketPort){
|
||||||
url = window.location.protocol + '//' + window.location.hostname + ':' + $window.socketPort;
|
url = window.location.protocol + '//' + window.location.hostname + ':' + $window.socketPort;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue