diff --git a/cloudcmd.js b/cloudcmd.js index e1c5d420..1e421763 100644 --- a/cloudcmd.js +++ b/cloudcmd.js @@ -61,7 +61,7 @@ writeLogsToFile(); } - server.start(); + server(); } function readConfig(callback) { diff --git a/lib/server.js b/lib/server.js index 7ae989cb..99e4a68b 100644 --- a/lib/server.js +++ b/lib/server.js @@ -56,7 +56,7 @@ * start server function * */ - function start() { + module.exports = function() { var port, ip, HTTP = 'http://', config = main.config; @@ -71,7 +71,7 @@ if (config.server) createServer(port, ip, HTTP); - } + }; function createServer(port, ip, protocol, callback) { var server, app, respondApp, @@ -201,6 +201,4 @@ return controller.bind(null, dir); }; - exports.start = start; - })();