projects
/
osm
/
UI.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Resolving Bug 155
[osm/UI.git]
/
skyquake
/
framework
/
core
/
api_utils
/
utils.js
diff --git
a/skyquake/framework/core/api_utils/utils.js
b/skyquake/framework/core/api_utils/utils.js
index
0d1990c
..
5b17279
100644
(file)
--- a/
skyquake/framework/core/api_utils/utils.js
+++ b/
skyquake/framework/core/api_utils/utils.js
@@
-217,6
+217,15
@@
var passThroughConstructor = function(app) {
});
}
});
}
+var getPortForProtocol = function(protocol) {
+ switch (protocol) {
+ case 'http':
+ return 8000;
+ case 'https':
+ return 8443;
+ }
+}
+
module.exports = {
/**
* Ensure confd port is on api_server variable.
module.exports = {
/**
* Ensure confd port is on api_server variable.
@@
-233,5
+242,7
@@
module.exports = {
sendSuccessResponse: sendSuccessResponse,
sendSuccessResponse: sendSuccessResponse,
- passThroughConstructor: passThroughConstructor
+ passThroughConstructor: passThroughConstructor,
+
+ getPortForProtocol: getPortForProtocol
};
};