From 0425b82c833aeaccd49532dd725602912b3c4346 Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Fri, 17 Jun 2022 17:46:57 -0400 Subject: [PATCH] fix(kernel): handle SIGTERM graceful shutdown --- server/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/index.js b/server/index.js index 87eff16b..96f5e4a6 100644 --- a/server/index.js +++ b/server/index.js @@ -38,6 +38,9 @@ WIKI.kernel.init() // Register exit handler // ---------------------------------------- +process.on('SIGTERM', () => { + WIKI.kernel.shutdown() +}) process.on('SIGINT', () => { WIKI.kernel.shutdown() })