mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-19 09:24:51 +00:00
minor changes
This commit is contained in:
parent
6dd8a0b1fc
commit
9e837833ee
1 changed files with 6 additions and 5 deletions
|
|
@ -52,6 +52,7 @@
|
|||
/* Functions */
|
||||
exports.generateHeaders = generateHeaders,
|
||||
exports.sendFile = sendFile,
|
||||
|
||||
exports.require = mrequire,
|
||||
exports.librequire = librequire,
|
||||
exports.srvrequire = srvrequire,
|
||||
|
|
@ -91,7 +92,7 @@
|
|||
* second initializing after all modules load, so global var is
|
||||
* totally filled of all information that should know all modules
|
||||
*/
|
||||
var main = global.cloudcmd.main = exports;
|
||||
global.cloudcmd.main = exports;
|
||||
|
||||
/**
|
||||
* function do safe require of needed module
|
||||
|
|
@ -99,7 +100,7 @@
|
|||
*/
|
||||
function mrequire(pSrc){
|
||||
var lModule,
|
||||
lError = Util.tryCatch(function(){
|
||||
lError = Util.tryCatchLog(function(){
|
||||
lModule = require(pSrc);
|
||||
});
|
||||
|
||||
|
|
@ -112,7 +113,7 @@
|
|||
function rootrequire(pSrc){ return mrequire(DIR + pSrc); }
|
||||
|
||||
function librequire(pSrc){ return mrequire(LIBDIR + pSrc); }
|
||||
|
||||
|
||||
function srvrequire(pSrc){ return mrequire(SRVDIR + pSrc); }
|
||||
|
||||
/**
|
||||
|
|
@ -167,8 +168,8 @@
|
|||
lRet['content-encoding'] = 'gzip';
|
||||
|
||||
return lRet;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* send file to client thru pipe
|
||||
* and gzip it if client support
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue