NodeBB will now listen to SIGINT signal

This commit is contained in:
Julian Lam
2014-02-21 23:52:23 -05:00
parent 3958ee4120
commit ef63d816fe

View File

@@ -44,6 +44,16 @@ if(nconf.get('ssl')) {
module.exports.server = server;
// Signals
process.on('SIGINT', function() {
winston.info('[app] Shutdown Initialised.');
db.close();
winston.info('[app] Database connection closed.');
winston.info('[app] Goodbye!');
process.exit();
});
(function (app) {
"use strict";