Deprecating serverAdress.js

revert-70aa11f8
dilanua 8 years ago
parent 5ed3174a28
commit 1172e759ca

@ -16,55 +16,59 @@
* under the License. * under the License.
*/ */
var serverAddress = function () { /*
var log = new Log("serverAddress.js"); @Deprecated - new
var process = require("process"), */
host = process.getProperty('server.host'),
ip = process.getProperty('carbon.local.ip'); //var serverAddress = function () {
var publicMethods = {}; // var log = new Log("serverAddress.js");
publicMethods.getHTTPSAddress = function () { // var process = require("process"),
var port = process.getProperty('mgt.transport.https.proxyPort'); // host = process.getProperty('server.host'),
if (!port) { // ip = process.getProperty('carbon.local.ip');
port = process.getProperty('mgt.transport.https.port'); // var publicMethods = {};
} // publicMethods.getHTTPSAddress = function () {
if (host === "localhost") { // var port = process.getProperty('mgt.transport.https.proxyPort');
return "https://" + ip + ":" + port; // if (!port) {
} else { // port = process.getProperty('mgt.transport.https.port');
return "https://" + host + ":" + port; // }
} // if (host === "localhost") {
}; // return "https://" + ip + ":" + port;
publicMethods.getHPPTAddress = function () { // } else {
var port = process.getProperty('mgt.transport.http.proxyPort'); // return "https://" + host + ":" + port;
if (!port) { // }
port = process.getProperty('mgt.transport.http.port'); // };
} // publicMethods.getHPPTAddress = function () {
if (host === "localhost") { // var port = process.getProperty('mgt.transport.http.proxyPort');
return "http://" + ip + ":" + port; // if (!port) {
} else { // port = process.getProperty('mgt.transport.http.port');
return "http://" + host + ":" + port; // }
} // if (host === "localhost") {
}; // return "http://" + ip + ":" + port;
publicMethods.getWSSAddress = function () { // } else {
var port = process.getProperty('mgt.transport.https.proxyPort'); // return "http://" + host + ":" + port;
if (!port) { // }
port = process.getProperty('mgt.transport.https.port'); // };
} // publicMethods.getWSSAddress = function () {
if (host === "localhost") { // var port = process.getProperty('mgt.transport.https.proxyPort');
return "wss://" + ip + ":" + port; // if (!port) {
} else { // port = process.getProperty('mgt.transport.https.port');
return "wss://" + host + ":" + port; // }
} // if (host === "localhost") {
}; // return "wss://" + ip + ":" + port;
publicMethods.getWSAddress = function () { // } else {
var port = process.getProperty('mgt.transport.http.proxyPort'); // return "wss://" + host + ":" + port;
if (!port) { // }
port = process.getProperty('mgt.transport.http.port'); // };
} // publicMethods.getWSAddress = function () {
if (host === "localhost") { // var port = process.getProperty('mgt.transport.http.proxyPort');
return "ws://" + ip + ":" + port; // if (!port) {
} else { // port = process.getProperty('mgt.transport.http.port');
return "ws://" + host + ":" + port; // }
} // if (host === "localhost") {
}; // return "ws://" + ip + ":" + port;
return publicMethods; // } else {
}(); // return "ws://" + host + ":" + port;
// }
// };
// return publicMethods;
//}();
Loading…
Cancel
Save