From 0a476ca569dd66085d9a484fcd50100cd473e1fd Mon Sep 17 00:00:00 2001 From: pan <1029559041@qq.com> Date: Sun, 11 Oct 2020 06:59:00 +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 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app.js b/app.js index b4a0b17..b746df7 100644 --- a/app.js +++ b/app.js @@ -8,6 +8,7 @@ var indexRouter = require('./routes/index'); var accountRouter = require('./routes/account') var mainRouter=require('./routes/main/main') var projectRouter=require('./routes/main/project') +const server = require("inspector"); var app = express(); @@ -45,4 +46,10 @@ app.use(function(err, req, res, next) { res.render('error'); }); +// listen for TERM signal .e.g. kill +process.on ('SIGTERM', ()=>process.exit()); + +// listen for INT signal e.g. Ctrl-C +process.on ('SIGINT', ()=>process.exit()); + module.exports = app;