|
|
@ -48,14 +48,14 @@ app.use(function(err, req, res, next) { |
|
|
|
|
|
|
|
|
|
|
|
// listen for TERM signal .e.g. kill
|
|
|
|
// listen for TERM signal .e.g. kill
|
|
|
|
process.on ('SIGTERM', ()=>{ |
|
|
|
process.on ('SIGTERM', ()=>{ |
|
|
|
process.exit() |
|
|
|
|
|
|
|
console.info('SIGTERM退出') |
|
|
|
console.info('SIGTERM退出') |
|
|
|
|
|
|
|
process.exit() |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// listen for INT signal e.g. Ctrl-C
|
|
|
|
// listen for INT signal e.g. Ctrl-C
|
|
|
|
process.on ('SIGINT', ()=>{ |
|
|
|
process.on ('SIGINT', ()=>{ |
|
|
|
process.exit() |
|
|
|
|
|
|
|
console.info('SIGINT退出') |
|
|
|
console.info('SIGINT退出') |
|
|
|
|
|
|
|
process.exit() |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
module.exports = app; |
|
|
|
module.exports = app; |
|
|
|