I am using Express as my Node.js web framework with MongoDB as persistence layer. When I run the server with 'node app.js' command, and occasionally some error occur such as mongoose error or imagemagick error, the hole node process will die and not available from browser. I used Express' error handler but this is still happening. Can someone help?
process.on('uncaughtException', function (err) {
console.error(err);
console.log("Node NOT Exiting...");
});
clusters.on('death', function(worker) {
app.listen(3000);
});