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,
|
||||
socketPort: process.env.SOCKET_PORT || 20523,
|
||||
|
||||
templateEngine: 'swig',
|
||||
|
||||
|
|
1
config/env/development.js
vendored
1
config/env/development.js
vendored
|
@ -9,7 +9,6 @@ module.exports = {
|
|||
pass: ''
|
||||
}
|
||||
},
|
||||
socketPort: process.env.SOCKET_PORT || 20523,
|
||||
|
||||
log: {
|
||||
// Can specify one of 'combined', 'common', 'dev', 'short', 'tiny'
|
||||
|
|
10
public/dist/form-application.js
vendored
10
public/dist/form-application.js
vendored
|
@ -1210,14 +1210,16 @@ angular.module('view-form').factory('Forms', ['$resource', 'VIEW_FORM_URL',
|
|||
};
|
||||
|
||||
var url = '';
|
||||
console.log("$window.socketPort: "+$window.socketPort);
|
||||
console.log("$window.socketUrl: "+$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){
|
||||
url = $window.socketUrl;
|
||||
url = window.location.protocol + '//' + $window.socketUrl;
|
||||
} else if ($window.socketPort){
|
||||
url = window.location.protocol+'//'+window.location.hostname + ':' + $window.socketPort;
|
||||
url = window.location.protocol + '//' + window.location.hostname + ':' + $window.socketPort;
|
||||
} else {
|
||||
url = window.location.protocol+'//'+window.location.hostname;
|
||||
url = window.location.protocol + '//' + window.location.hostname;
|
||||
}
|
||||
connect(url);
|
||||
|
||||
|
|
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,14 +18,16 @@
|
|||
};
|
||||
|
||||
var url = '';
|
||||
console.log("$window.socketPort: "+$window.socketPort);
|
||||
console.log("$window.socketUrl: "+$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){
|
||||
url = $window.socketUrl;
|
||||
url = window.location.protocol + '//' + $window.socketUrl;
|
||||
} else if ($window.socketPort){
|
||||
url = window.location.protocol+'//'+window.location.hostname + ':' + $window.socketPort;
|
||||
url = window.location.protocol + '//' + window.location.hostname + ':' + $window.socketPort;
|
||||
} else {
|
||||
url = window.location.protocol+'//'+window.location.hostname;
|
||||
url = window.location.protocol + '//' + window.location.hostname;
|
||||
}
|
||||
connect(url);
|
||||
|
||||
|
|
Loading…
Reference in a new issue