mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
minor changes
This commit is contained in:
parent
045caf467e
commit
6d35bdc99d
1 changed files with 23 additions and 18 deletions
|
|
@ -1,12 +1,18 @@
|
|||
(function(){
|
||||
"strict mode";
|
||||
|
||||
/* Global var accessible from any loaded module */
|
||||
global.cloudcmd = {};
|
||||
|
||||
var DIR,
|
||||
LIBDIR,
|
||||
SRVDIR,
|
||||
Util,
|
||||
|
||||
SLASH,
|
||||
ISWIN32 = process.platform == 'win32',
|
||||
ISWIN32,
|
||||
path,
|
||||
|
||||
OK = 200,
|
||||
ERROR = 404,
|
||||
Extensions = {
|
||||
|
|
@ -19,17 +25,26 @@
|
|||
'.appcache' : 'text/cache-manifest',
|
||||
'.mp3' : 'audio/mpeg'
|
||||
};
|
||||
|
||||
/* Global var accessible from any loaded module */
|
||||
global.cloudcmd = {},
|
||||
|
||||
|
||||
/* Native Modules*/
|
||||
exports.crypto = require('crypto'),
|
||||
exports.child_process = require('child_process'),
|
||||
exports.fs = require('fs'),
|
||||
exports.http = require('http'),
|
||||
exports.https = require('https'),
|
||||
exports.path = path = require('path'),
|
||||
exports.url = require('url'),
|
||||
exports.querystring = require('querystring'),
|
||||
|
||||
/* Constants */
|
||||
/* current dir + 2 levels up */
|
||||
exports.WIN32 = ISWIN32 = isWin32();
|
||||
exports.SLASH = SLASH = ISWIN32 ? '\\' : '/',
|
||||
exports.SRVDIR = SRVDIR = __dirname + SLASH,
|
||||
exports.LIBDIR = LIBDIR = SRVDIR + '..' + SLASH,
|
||||
exports.DIR = DIR = LIBDIR + '..' + SLASH,
|
||||
exports.WIN32 = isWin32();
|
||||
|
||||
exports.SRVDIR = SRVDIR = __dirname + SLASH,
|
||||
exports.LIBDIR = LIBDIR = path.normalize(SRVDIR + '../'),
|
||||
exports.DIR = DIR = path.normalize(LIBDIR + '../'),
|
||||
|
||||
/* Functions */
|
||||
exports.generateHeaders = generateHeaders,
|
||||
|
|
@ -39,16 +54,6 @@
|
|||
exports.srvrequire = srvrequire,
|
||||
exports.rootrequire = rootrequire,
|
||||
|
||||
/* Native Modules*/
|
||||
exports.crypto = require('crypto'),
|
||||
exports.child_process = require('child_process'),
|
||||
exports.fs = require('fs'),
|
||||
exports.http = require('http'),
|
||||
exports.https = require('https'),
|
||||
exports.path = require('path'),
|
||||
exports.url = require('url'),
|
||||
exports.querystring = require('querystring'),
|
||||
|
||||
/* compitability with old versions of node */
|
||||
exports.fs.exists = exports.fs.exists || exports.path.exists;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue