log server errors in browser

added uid to posts
This commit is contained in:
Baris Soner Usakli
2013-04-30 12:40:16 -04:00
parent a6cbed94fc
commit 20aa5d439e
5 changed files with 30 additions and 6 deletions

8
app.js
View File

@@ -17,6 +17,12 @@ global.modules = modules;
// 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;
@@ -25,6 +31,6 @@ global.modules = modules;
// modules.webserver.init();
modules.websockets.init();
}(global.configuration));