projects
/
osm
/
UI.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update from RIFT as of 696b75d2fe9fb046261b08c616f1bcf6c0b54a9b third try
[osm/UI.git]
/
skyquake
/
framework
/
core
/
modules
/
api
/
configuration.js
diff --git
a/skyquake/framework/core/modules/api/configuration.js
b/skyquake/framework/core/modules/api/configuration.js
index
3762643
..
d1fca27
100644
(file)
--- a/
skyquake/framework/core/modules/api/configuration.js
+++ b/
skyquake/framework/core/modules/api/configuration.js
@@
-1,5
+1,5
@@
/*
/*
- *
+ *
* Copyright 2016 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Copyright 2016 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@
-30,7
+30,11
@@
var configurationAPI = {};
var _ = require('lodash');
var GLOBAL_CONFIGURATION = {
api_server: 'localhost',
var _ = require('lodash');
var GLOBAL_CONFIGURATION = {
api_server: 'localhost',
- ssl_enabled: true
+ ssl_enabled: true,
+ api_server_port_number: constants.SECURE_SERVER_PORT,
+ idp_server_address: constants.LAUNCHPAD_ADDRESS,
+ idp_server_protocol: constants.IDP_SERVER_PROTOCOL,
+ idp_server_port_number: constants.IDP_PORT_NUMBER
};
/**
};
/**
@@
-92,4
+96,18
@@
configurationAPI.globalConfiguration.get = function() {
return GLOBAL_CONFIGURATION;
};
return GLOBAL_CONFIGURATION;
};
+var backendURL = null;
+configurationAPI.getBackendURL = function () {
+ if (!backendURL) {
+ backendURL = GLOBAL_CONFIGURATION.api_server_protocol + '://' + GLOBAL_CONFIGURATION.api_server + ':' + GLOBAL_CONFIGURATION.api_server_port_number;
+ }
+ return backendURL;
+}
+
+configurationAPI.getBackendAPI = function () {
+ return configurationAPI.getBackendURL() + '/v2/api';
+}
+
+
+
module.exports = configurationAPI;
module.exports = configurationAPI;