Feature: manage npm stop command

This commit is contained in:
2015-08-20 10:27:30 +00:00
parent 38ae7f7c06
commit f91874d496
2 changed files with 4 additions and 1 deletions

View File

@@ -25,6 +25,7 @@
},
"scripts": {
"test": "NODE_ENV=test mocha",
"start": "app.js"
"start": "app.js",
"stop": "pkill --signal SIGINT CloudBudget"
}
}

View File

@@ -52,6 +52,8 @@ require('./app/routes')(app);
this.app = app;
this.server = server;
process.title = 'CloudBudget';
exports.listen = function () {
if( process.env.NODE_ENV !== 'test' ) {
console.log('Server running in ' + process.env.NODE_ENV + ' mode on port ' + this.server.port );