dorbel-tech / dorbel-shared

dorbel shared dependencies used in dorbel-app
0 stars 1 forks source link

Better handle process exit in all apps #14

Closed virtser closed 7 years ago

virtser commented 7 years ago

Move catch all uncaught exceptions to dorbel-shared and write to log. Use https://github.com/node-microservice/koa-terminator

This code exists in all APIs/Serices:

process.on('uncaughtException', function(err) {
  logger.error(err);
  process.exit(1);
});