From 853a2339312ebc72ee2777e20ef0b243b81f204d Mon Sep 17 00:00:00 2001 From: pan <1029559041@qq.com> Date: Sun, 11 Oct 2020 07:29:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index b746df7..cff5bc4 100644 --- a/app.js +++ b/app.js @@ -47,9 +47,15 @@ app.use(function(err, req, res, next) { }); // listen for TERM signal .e.g. kill -process.on ('SIGTERM', ()=>process.exit()); +process.on ('SIGTERM', ()=>{ + process.exit() + console.info('SIGTERM退出') +}); // listen for INT signal e.g. Ctrl-C -process.on ('SIGINT', ()=>process.exit()); +process.on ('SIGINT', ()=>{ + process.exit() + console.info('SIGINT退出') +}); module.exports = app;