Improved error handling
This commit is contained in:
8
index.js
8
index.js
@@ -10,10 +10,14 @@ const eventEmitter = new EventEmitter();
|
||||
shared.eventEmitter = eventEmitter;
|
||||
let baseToken = process.env.BASE_TOKEN;
|
||||
shared.setToken(baseToken);
|
||||
|
||||
/*
|
||||
global.minute = 1000 * 60;
|
||||
global.hour = minute * 60;
|
||||
global.day = hour * 24;
|
||||
*/
|
||||
global.minute = 1000;
|
||||
global.hour = minute * 10;
|
||||
global.day = hour * 3;
|
||||
|
||||
app.listen(port, () => {
|
||||
Log(`[${shared.now()}] Il server è online sulla porta ${port}`);
|
||||
@@ -33,6 +37,6 @@ if ("BASE_TOKEN" in process.env) {
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
app.get("/", (req, res) => {
|
||||
app.get("/", (_, res) => {
|
||||
res.json(shared.getHosts());
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user