You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
888 B
JavaScript
36 lines
888 B
JavaScript
var modules = {
|
|
user: require('./src/user.js'),
|
|
topics: require('./src/topics.js'),
|
|
posts: require('./src/posts.js'),
|
|
templates: require('./src/templates.js'),
|
|
webserver: require('./src/webserver.js'),
|
|
websockets: require('./src/websockets.js')
|
|
}
|
|
|
|
DEVELOPMENT = true;
|
|
|
|
|
|
global.configuration = {};
|
|
global.modules = modules;
|
|
|
|
// change this to = null when auth module is complete
|
|
// global.uid = 1;
|
|
|
|
|
|
process.on('uncaughtException', function(err) {
|
|
// handle the error safely
|
|
console.log("error message "+err);
|
|
global.socket.emit('event:consolelog',{type:'uncaughtException',stack:err.stack,error:err.toString()});
|
|
});
|
|
|
|
|
|
(function(config) {
|
|
config['ROOT_DIRECTORY'] = __dirname;
|
|
|
|
modules.templates.init();
|
|
// modules.webserver.init();
|
|
modules.websockets.init();
|
|
|
|
|
|
|
|
}(global.configuration)); |