diff --git a/lib/server.js b/lib/server.js index 4de38e78..f2e2c17f 100644 --- a/lib/server.js +++ b/lib/server.js @@ -1,7 +1,7 @@ (function() { 'use strict'; - if(!global.cloudcmd) + if (!global.cloudcmd) return console.log( '# server.js' + '\n' + '# -----------' + '\n' + @@ -44,7 +44,7 @@ Util.exec(Minimize, lMinifyAllowed); /* создаём файл app cache */ - if( lConfig.appcache && AppCache && lConfig.server ) + if (lConfig.appcache && AppCache && lConfig.server ) Util.exec( pAppCachProcessing ); } @@ -57,7 +57,7 @@ function start(pProcessing) { var lConfig = main.config; - if(!pProcessing) + if (!pProcessing) pProcessing = {}; Rest = pProcessing.rest; @@ -70,7 +70,7 @@ process.env.app_port || /* nodester */ process.env.VCAP_APP_PORT || /* cloudfoundry */ lConfig.port, - + lIP = process.env.IP || /* c9 */ lConfig.ip || (main.WIN32 ? '127.0.0.1' : '0.0.0.0'), @@ -132,10 +132,9 @@ Server.listen(lSSLPort, lIP); lServerLog(lHTTPS, lSSLPort); - } - else + } else lHTTPServer(); - }else + } else Util.log('Cloud Commander testing mode'); } @@ -164,17 +163,17 @@ response : pRes }; - if( lConfig.rest ) + if (lConfig.rest ) lRet = Util.exec(Rest, lData); - if( !lRet && Route) + if (!lRet && Route) lRet = Util.exec(Route, lData); - if(!lRet) { + if (!lRet) { lName = lData.name; /* watching is file changed */ - if(lConfig.appcache) + if (lConfig.appcache) AppCache.watch(lName); lName = Path.join(DIR, lName);