+
+
/*
*
* Copyright 2016 RIFT.IO Inc
var app = express();
+ app.set('views', __dirname + '/framework/core/views');
+ app.engine('html', require('ejs').renderFile);
+
app.use(session({
secret: 'ritio rocks',
- resave: true,
+ resave: false,
saveUninitialized: true
}));
app.use(bodyParser.json());
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
}
+ /**
+ * 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
//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('/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();
+ });
+
}
/**