Exit on SIGINT or SIGTERM
This commit is contained in:
parent
1fd1c932ca
commit
50051076d9
|
@ -15,3 +15,9 @@ boot();
|
||||||
process.on("uncaughtException", function (err) {
|
process.on("uncaughtException", function (err) {
|
||||||
console.log(`Caught exception: ${err.message} ${err.stack}`);
|
console.log(`Caught exception: ${err.message} ${err.stack}`);
|
||||||
});
|
});
|
||||||
|
process.on("SIGINT", function () {
|
||||||
|
process.exit();
|
||||||
|
});
|
||||||
|
process.on("SIGTERM", function () {
|
||||||
|
process.exit();
|
||||||
|
});
|
||||||
|
|
Loading…
Reference in New Issue