From a44549e1f70ae713afb5c021e14800524cf1889c Mon Sep 17 00:00:00 2001 From: Tom Kirkpatrick Date: Sun, 11 Feb 2024 11:08:37 +0000 Subject: [PATCH] Exit process on receipt of OS SIGINT signal --- src/server.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/server.tsx b/src/server.tsx index 5c4de10..62a7aa0 100644 --- a/src/server.tsx +++ b/src/server.tsx @@ -417,3 +417,8 @@ export default { port, fetch: app.fetch, } + +process.on('SIGINT', function() { + console.info("Caught interrupt signal. Exiting."); + process.exit(); +});