mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-22 16:30:34 +01:00
log server errors in browser
added uid to posts
This commit is contained in:
8
app.js
8
app.js
@@ -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));
|
||||
Reference in New Issue
Block a user