projects
/
osm
/
UI.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Project page rw-mano fix
[osm/UI.git]
/
skyquake
/
skyquake.js
diff --git
a/skyquake/skyquake.js
b/skyquake/skyquake.js
index
726757f
..
685f049
100644
(file)
--- a/
skyquake/skyquake.js
+++ b/
skyquake/skyquake.js
@@
-1,3
+1,5
@@
+
+
/*
*
* Copyright 2016 RIFT.IO Inc
/*
*
* Copyright 2016 RIFT.IO Inc
@@
-105,9
+107,12
@@
if (cluster.isMaster && clusteredLaunch) {
var app = express();
var app = express();
+ app.set('views', __dirname + '/framework/core/views');
+ app.engine('html', require('ejs').renderFile);
+
app.use(session({
secret: 'ritio rocks',
app.use(session({
secret: 'ritio rocks',
- resave:
tru
e,
+ resave:
fals
e,
saveUninitialized: true
}));
app.use(bodyParser.json());
saveUninitialized: true
}));
app.use(bodyParser.json());
@@
-135,6
+140,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 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
/**
* Processing when a plugin is added or modified
* @param {string} plugin_name - Name of the plugin
@@
-156,6
+164,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
/**
* Start listening on a port
* @param {string} port - Port to listen on
@@
-214,6
+231,15
@@
if (cluster.isMaster && clusteredLaunch) {
//Configure descriptor route(s)
app.use(descriptor_routes);
//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');
// });
// app.get('/testme', function(req, res) {
// res.sendFile(__dirname + '/index.html');
// });
@@
-248,6
+274,13
@@
if (cluster.isMaster && clusteredLaunch) {
app.get('/multiplex-client', function(req, res) {
res.sendFile(__dirname + '/node_modules/websocket-multiplex/multiplex_client.js');
});
app.get('/multiplex-client', function(req, res) {
res.sendFile(__dirname + '/node_modules/websocket-multiplex/multiplex_client.js');
});
+
+ // handle requests for gzip'd files
+ app.get('*gzip*', function (req, res, next) {
+ res.set('Content-Encoding', 'gzip');
+ next();
+ });
+
}
/**
}
/**