From e3313f7a1bd694829117f79a65919259f797ee52 Mon Sep 17 00:00:00 2001 From: briandennis Date: Mon, 14 May 2018 20:34:45 -0500 Subject: [PATCH] close server on SIGINT --- server.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server.js b/server.js index 8a11bbd..809e932 100644 --- a/server.js +++ b/server.js @@ -9,6 +9,8 @@ const dev = process.env.NODE_ENV !== 'production' const app = next({ dev }) const handle = app.getRequestHandler() +process.on('SIGINT', process.exit) + if (!dev) { const LOGS_ID = `${process.env.LOGS_SECRET_PREFIX}:${process.env.NOW_URL}` require('now-logs')(LOGS_ID)