X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=skyquake%2Fskyquake.js;h=3fd904dbf582aae374f4ea1f88a64aae10f4abbf;hb=de8cda680ce17b1555789bf2f4d3145c0d4d4849;hp=b9af78affd72d49cf53070c2f8db1fef9838ef3e;hpb=d1f2a7f4631cca78b7dfc744aae1beb3123c5698;p=osm%2FUI.git diff --git a/skyquake/skyquake.js b/skyquake/skyquake.js index b9af78aff..3fd904dbf 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,8 @@ 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'); + var projectManagement_routes = require('./framework/core/modules/routes/projectManagement'); /** * Processing when a plugin is added or modified * @param {string} plugin_name - Name of the plugin @@ -194,9 +199,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 +216,12 @@ if (cluster.isMaster && clusteredLaunch) { //Configure descriptor route(s) app.use(descriptor_routes); + //Configure user management route(s) + app.use(userManagement_routes); + + //Configure project management route(s) + app.use(projectManagement_routes); + // app.get('/testme', function(req, res) { // res.sendFile(__dirname + '/index.html'); // });