diff --git a/bundle/src/Server.ts b/bundle/src/Server.ts index 81948666f..3ed98b153 100644 --- a/bundle/src/Server.ts +++ b/bundle/src/Server.ts @@ -26,6 +26,7 @@ const gateway = new Gateway.Server({ server, port, production }); //this is what has been added for the /stop API route process.on('SIGTERM', () => { + setTimeout(()=>process.exit(0), 3000) server.close(() => { console.log("Stop API has been successfully POSTed, SIGTERM sent") })