From c120db57632da2bb53f9eb9d5fe371154ade7e09 Mon Sep 17 00:00:00 2001 From: AlecM33 Date: Tue, 17 Jan 2023 21:32:50 -0500 Subject: [PATCH] add test SIGTERM handler --- index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/index.js b/index.js index 28617f6..9b205f1 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,10 @@ 'use strict'; +process.on('SIGTERM', function () { + console.log('received SIGTERM, exiting gracefully'); + process.exit(0); +}); + const express = require('express'); const app = express(); const ServerBootstrapper = require('./server/modules/ServerBootstrapper');