|
|
@ -570,15 +570,19 @@ let indexHTML = fs.readFileSync("./dist/index.html").toString();
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
console.log("Init")
|
|
|
|
console.log("Init the server")
|
|
|
|
server.listen(port, hostname, () => {
|
|
|
|
|
|
|
|
|
|
|
|
server.once("error", async (err) => {
|
|
|
|
|
|
|
|
console.error("Cannot listen: " + err.message);
|
|
|
|
|
|
|
|
await Database.close();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
server.listen(port, hostname, () => {
|
|
|
|
if (hostname) {
|
|
|
|
if (hostname) {
|
|
|
|
console.log(`Listening on ${hostname}:${port}`);
|
|
|
|
console.log(`Listening on ${hostname}:${port}`);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
console.log("Listening on ${port}");
|
|
|
|
console.log("Listening on ${port}");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
startMonitors();
|
|
|
|
startMonitors();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|