diff --git a/ecosystem.json b/ecosystem.json index 911121d..51b9d4b 100644 --- a/ecosystem.json +++ b/ecosystem.json @@ -10,9 +10,9 @@ "script": "web-server.js", "cwd": "/var/www/silvrtree", "watch": true, - "max_restarts": 10, + "ignore_watch" : ["node_modules"], "merge_logs" : true, - "autorestart" : false, + "autorestart" : true, "restart_delay" : 3500, "max_memory_restart" : "300M", env: { diff --git a/web-server.js b/web-server.js index e274b3e..434081d 100644 --- a/web-server.js +++ b/web-server.js @@ -7,6 +7,8 @@ var express = require('express'), path = require('path'), http = require('http') //train = require('lib/train') /* ,submit = require('./routes/mongo/submit') */ ; + +var logger = require('log4js').getLogger(); var app = express(); GLOBAL.lastcheck = 0; var btcCache = {}, fxCache = {} , trainCache = {}; @@ -102,5 +104,6 @@ app.use('/btc', btc.doBTC); * create the server */ http.createServer(app).listen(app.get('port'), function () { - console.log("Express server listening on port " + app.get('port')); + logger.info("Express server listening on port " + app.get('port')); + //console.log("Express server listening on port " + app.get('port')); });