mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
added ability to change configs without restart (works for js minification only)
This commit is contained in:
parent
ef47727bdc
commit
53d4721ece
3 changed files with 11 additions and 11 deletions
|
|
@ -166,7 +166,8 @@ for now it's much simplier.
|
|||
|
||||
* Fixed the first show of menu in firefox.
|
||||
|
||||
* Added ability to change configs without restart.
|
||||
* Added ability to change configs without restart
|
||||
(works for js minification only).
|
||||
|
||||
|
||||
2012.12.12, Version 0.1.8
|
||||
|
|
|
|||
14
cloudcmd.js
14
cloudcmd.js
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
server = main.librequire('server'),
|
||||
Minify = main.minify,
|
||||
Config,
|
||||
Config = main.config,
|
||||
|
||||
REQUEST = 'request',
|
||||
RESPONSE = 'response',
|
||||
|
|
@ -160,7 +160,7 @@
|
|||
process.chdir(lServerDir);
|
||||
}
|
||||
Util.log('server dir: ' + lServerDir);
|
||||
Util.log('reading configuretion file config.json...');
|
||||
Util.log('reading configuration file config.json...');
|
||||
|
||||
if(Config){
|
||||
Util.log('config.json readed');
|
||||
|
|
@ -191,11 +191,15 @@
|
|||
if(!pError){
|
||||
Util.log('config: readed');
|
||||
|
||||
var lStr = pData.toString();
|
||||
main.config = Config = JSON.parse(lStr);
|
||||
var lStr = pData.toString(),
|
||||
lReadedConf = Util.parseJSON(lStr);
|
||||
|
||||
if(!Config.minification)
|
||||
main.config = Config = lReadedConf;
|
||||
|
||||
Util.tryCatchLog(function(){
|
||||
Minify.setAllowed(main.config.minification);
|
||||
Config.minification.js = lReadedConf.minification.js;
|
||||
Minify.setAllowed(Config.minification);
|
||||
});
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -57,11 +57,6 @@
|
|||
|
||||
if(!pProcessing)
|
||||
pProcessing = {};
|
||||
|
||||
else
|
||||
Util.log('warning: configuretion file config.json not found...\n' +
|
||||
'using default values...\n' +
|
||||
JSON.stringify(lConfig));
|
||||
|
||||
Rest = pProcessing.rest;
|
||||
Route = pProcessing.route;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue