chore: add graceful shutdown

This commit is contained in:
canove
2020-11-07 17:30:42 -03:00
parent 5b4969f992
commit 236bb8597e

View File

@@ -1,3 +1,4 @@
import gracefulShutdown from "http-graceful-shutdown";
import app from "./app";
import { initIO } from "./libs/socket";
import { StartAllWhatsAppsSessions } from "./services/WbotServices/StartAllWhatsAppsSessions";
@@ -8,3 +9,4 @@ const server = app.listen(process.env.PORT, () => {
initIO(server);
StartAllWhatsAppsSessions();
gracefulShutdown(server);