From 12d8212ef1d46b2fc6c03935c83cfb40a00f7dae Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 28 Feb 2013 09:41:57 -0500 Subject: [PATCH] fixed bug with fs.watch and test mode --- cloudcmd.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/cloudcmd.js b/cloudcmd.js index 33f467f1..37892631 100644 --- a/cloudcmd.js +++ b/cloudcmd.js @@ -128,13 +128,6 @@ } function init(){ - fs.watch(CONFIG_PATH, function(){ - /* every catch up - calling twice */ - setTimeout(function() { - readConfig(); - }, 1000); - }); - if(update) update.get(); @@ -174,6 +167,14 @@ } } + if(Config.server) + fs.watch(CONFIG_PATH, function(){ + /* every catch up - calling twice */ + setTimeout(function() { + readConfig(); + }, 1000); + }); + server.start({ appcache : appCacheProcessing, minimize : minimize,