Add sigint handler
This commit is contained in:
parent
31ee7f6367
commit
74d2fc6771
4
bin/node
4
bin/node
@ -45,6 +45,10 @@ process.on('unhandledRejection', (err, promise) => {
|
|||||||
throw err;
|
throw err;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
process.on('SIGINT', async () => {
|
||||||
|
await node.close();
|
||||||
|
});
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
await node.ensure();
|
await node.ensure();
|
||||||
await node.open();
|
await node.open();
|
||||||
|
|||||||
@ -33,6 +33,10 @@ process.on('unhandledRejection', (err, promise) => {
|
|||||||
throw err;
|
throw err;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
process.on('SIGINT', async () => {
|
||||||
|
await node.close();
|
||||||
|
});
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
await node.ensure();
|
await node.ensure();
|
||||||
await node.open();
|
await node.open();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user