X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=skyquake%2Fskyquake.js;h=41ac03bed744474c31a62489ea938e729225488c;hb=5e882a3f1564353f80dea0836af19368a89927e9;hp=b9af78affd72d49cf53070c2f8db1fef9838ef3e;hpb=b0a4a4d466ac4be21e0ed0fc50bc007366f4cbb1;p=osm%2FUI.git diff --git a/skyquake/skyquake.js b/skyquake/skyquake.js index b9af78aff..41ac03bed 100644 --- a/skyquake/skyquake.js +++ b/skyquake/skyquake.js @@ -83,6 +83,9 @@ if (cluster.isMaster && clusteredLaunch) { var sslOptions = null; + var apiServer = argv['api-server'] ? argv['api-server'] : 'localhost'; + var uploadServer = argv['upload-server'] ? argv['upload-server'] : null; + try { if (argv['enable-https']) { var keyFilePath = argv['keyfile-path']; @@ -132,6 +135,7 @@ if (cluster.isMaster && clusteredLaunch) { var descriptor_routes = require('./framework/core/modules/routes/descriptorModel'); var configuration_routes = require('./framework/core/modules/routes/configuration'); var configurationAPI = require('./framework/core/modules/api/configuration'); + var userManagement_routes = require('./framework/core/modules/routes/userManagement'); /** * Processing when a plugin is added or modified * @param {string} plugin_name - Name of the plugin @@ -194,9 +198,16 @@ if (cluster.isMaster && clusteredLaunch) { app.use(inactivity_routes); // Configure global config with ssl enabled/disabled - configurationAPI.globalConfiguration.update({ - ssl_enabled: httpsConfigured - }); + var globalConfig = { + ssl_enabled: httpsConfigured, + api_server: apiServer + }; + + if (uploadServer) { + globalConfig.upload_server = uploadServer; + } + + configurationAPI.globalConfiguration.update(globalConfig); // Configure configuration route(s) app.use(configuration_routes); @@ -204,6 +215,9 @@ if (cluster.isMaster && clusteredLaunch) { //Configure descriptor route(s) app.use(descriptor_routes); + //Configure user management route(s) + app.use(userManagement_routes); + // app.get('/testme', function(req, res) { // res.sendFile(__dirname + '/index.html'); // });