From 9d857d015f63cb73fa5ebf5af6e8f3bc3db45fb5 Mon Sep 17 00:00:00 2001 From: devlikepro Date: Tue, 8 Oct 2024 17:29:14 +0700 Subject: [PATCH] [core] Log signals --- src/main.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main.ts b/src/main.ts index ff7d2318..c2246448 100644 --- a/src/main.ts +++ b/src/main.ts @@ -29,6 +29,13 @@ process.on('unhandledRejection', (reason, promise) => { // @ts-ignore logger.error(reason.stack); }); +process.on('SIGINT', () => { + logger.info('SIGINT received'); +}); + +process.on('SIGTERM', () => { + logger.info('SIGTERM received'); +}); async function loadModules(): Promise< [typeof AppModuleCore, typeof SwaggerConfiguratorCore]