X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FUI.git;a=blobdiff_plain;f=skyquake%2Fskyquake.js;h=4c5adcf9304a28c6a38b2eea947b567c9d23a004;hp=726757fbbddafde334177d63aeaef2cc2237c963;hb=cd4119f7fd2ee97de0b2b5307c6de11e8e600acd;hpb=625a4c2118c4d095daf2a264643798eddf4d0491 diff --git a/skyquake/skyquake.js b/skyquake/skyquake.js index 726757fbb..4c5adcf93 100644 --- a/skyquake/skyquake.js +++ b/skyquake/skyquake.js @@ -105,6 +105,9 @@ if (cluster.isMaster && clusteredLaunch) { var app = express(); + app.set('views', __dirname + '/framework/core/views'); + app.engine('html', require('ejs').renderFile); + app.use(session({ secret: 'ritio rocks', resave: true, @@ -135,6 +138,9 @@ 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'); + var session_routes = require('./framework/core/modules/routes/sessions'); /** * Processing when a plugin is added or modified * @param {string} plugin_name - Name of the plugin @@ -156,6 +162,15 @@ if (cluster.isMaster && clusteredLaunch) { } + /** + * Serve jquery + */ + app.use('/jquery', express.static('./node_modules/jquery/dist/jquery.min.js')); + /** + * Serve images + */ + app.use('/img', express.static('./framework/style/img')); + /** * Start listening on a port * @param {string} port - Port to listen on @@ -214,6 +229,15 @@ 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); + + //Configure session route(s) + app.use(session_routes); + // app.get('/testme', function(req, res) { // res.sendFile(__dirname + '/index.html'); // });