Add SIGINT handler

This is so you can exit with a Ctrl-C.
This commit is contained in:
M Somerville
2016-03-16 23:06:46 +00:00
committed by Matthew Somerville
parent 3841c36889
commit f00a1ec426

View File

@@ -18,6 +18,11 @@
var chalk = require('chalk');
var config = require('./config/' + (process.env.NODE_ENV || 'development') + '.json');
process.on( 'SIGINT', function() {
console.log( '\nGracefully shutting down from SIGINT (Ctrl-C)' );
process.exit( );
});
require('./app')(config, function (err, app) {
console.log('');