diff --git a/lib/server/main.js b/lib/server/main.js index 05b7e12c..16332399 100644 --- a/lib/server/main.js +++ b/lib/server/main.js @@ -10,7 +10,7 @@ SLASH, ext, - path, zlib, url, CloudFunc, diffPatch, + zlib, CloudFunc, diffPatch, path, Config = { server : true, @@ -18,14 +18,11 @@ port : 80 }; - /* Native Modules*/ - exports.child_process = require('child_process'), - exports.path = path = require('path'), - exports.url = url = require('url'), + path = require('path'), /* Constants */ exports.SLASH = SLASH = '/', - + exports.SRVDIR = SRVDIR = __dirname + SLASH, exports.LIBDIR = LIBDIR = path.normalize(SRVDIR + '../'), exports.DIR = DIR = path.normalize(LIBDIR + '../'), @@ -42,8 +39,6 @@ /* we can not use librequare here */ exports.util = Util = require(LIBDIR + UTIL), - exports.zlib = zlib = mrequire('zlib'), - /* Main Information */ exports.modules = jsonrequire('modules'); exports.ext = ext = jsonrequire('ext'); diff --git a/lib/server/rest.js b/lib/server/rest.js index 1a7ccd30..e4caf9a6 100644 --- a/lib/server/rest.js +++ b/lib/server/rest.js @@ -15,7 +15,7 @@ var main = global.cloudcmd.main, fs = require('fs'), - path = main.path, + path = require('path'), crypto = require('crypto'), Util = main.util, CloudFunc = main.cloudfunc,