mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-21 23:41:18 +01:00
fix server not starting
broken by af421ec
This commit is contained in:
parent
c2a4b3f9f0
commit
99a5a34f3b
@ -17,5 +17,5 @@ if (cluster.isMaster) {
|
||||
|
||||
setInterval(cleaner.run, config.cleaning_interval * 1000);
|
||||
} else {
|
||||
require("../server.js")();
|
||||
require("../server.js").boot();
|
||||
}
|
||||
@ -111,7 +111,7 @@ h4 {
|
||||
}
|
||||
|
||||
.code .example {
|
||||
cursor: pointer;
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
.code .example:hover {
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user