diff --git a/bin/www.js b/bin/www.js index 148183f..323b4ef 100644 --- a/bin/www.js +++ b/bin/www.js @@ -17,5 +17,5 @@ if (cluster.isMaster) { setInterval(cleaner.run, config.cleaning_interval * 1000); } else { - require("../server.js")(); + require("../server.js").boot(); } \ No newline at end of file diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css index d633627..a8429ad 100644 --- a/public/stylesheets/style.css +++ b/public/stylesheets/style.css @@ -111,7 +111,7 @@ h4 { } .code .example { - cursor: pointer; + cursor: text; } .code .example:hover { diff --git a/server.js b/server.js index c6c49bd..5baf892 100644 --- a/server.js +++ b/server.js @@ -94,7 +94,9 @@ exp.boot = function(callback) { var bind_ip = process.env.BIND || "127.0.0.1"; logging.log("Server running on http://" + bind_ip + ":" + port + "/"); server = http.createServer(requestHandler).listen(port, bind_ip, function() { - callback(); + if (callback) { + callback(); + } }); }; @@ -102,12 +104,12 @@ exp.close = function(callback) { server.close(function() { callback(); }); -} +}; module.exports = exp; if (require.main === module) { - exp.boot(function(){}); + exp.boot(); // cleaning worker setInterval(clean.run, config.cleaning_interval * 1000);