From 25d5bbb35f8d89b4a5589d762ace84873b708a91 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 16 Sep 2014 04:52:02 -0400 Subject: [PATCH] feature(main) rm --- lib/server/auth.js | 2 +- lib/server/main.js | 45 --------------------------------------------- 2 files changed, 1 insertion(+), 46 deletions(-) delete mode 100644 lib/server/main.js diff --git a/lib/server/auth.js b/lib/server/auth.js index 598ec671..48754fa0 100644 --- a/lib/server/auth.js +++ b/lib/server/auth.js @@ -25,7 +25,7 @@ * @param callback */ - exports.auth = function(code, callback){ + module.exports = function(code, callback){ code = code.replace('code=', ''); Util.log(code); diff --git a/lib/server/main.js b/lib/server/main.js deleted file mode 100644 index 9a35eade..00000000 --- a/lib/server/main.js +++ /dev/null @@ -1,45 +0,0 @@ -(function() { - 'use strict'; - - /* Global var accessible from any loaded module */ - global.cloudcmd = {}; - - var Util, - - SLASH, - CloudFunc, path, - - Config = { - server : true, - socket : true, - port : 80 - }; - - path = require('path'), - - /* Constants */ - exports.SLASH = SLASH = '/', - - /* we can not use librequare here */ - Util = require('../util'), - - /* base configuration */ - exports.config = Config, - - - /* - * Any of loaded below modules could work with global var so - * it should be initialized first. Becouse of almost any of - * moudles do not depends on each other all needed information - * for all modules is initialized hear. - */ - global.cloudcmd.main = exports; - - /* Additional Modules */ - CloudFunc = require('../cloudfunc'), - exports.auth = require('./auth').auth, - - /* second initializing after all modules load, so global var is * - * totally filled of all information that should know all modules */ - global.cloudcmd.main = exports; -})();