diff --git a/index.js b/index.js index 24d8d48..6ca6e9a 100644 --- a/index.js +++ b/index.js @@ -5,21 +5,20 @@ const fs = require('fs'); require('dotenv').config(); // Use tycrek's logging library for fancy messages -const TLog = require('@tycrek/log'); -const logger = new TLog(); - +// also configure the timestamps so they don't appear +// timestamps look ugly +const TLog = require('@tycrek/log') const logger2 = new TLog({ timestamp: { enabled: false } - /* Options can be set here */ }); // Check if a custom port is set in .env // if it is, then check if a custom url is defined. Paste the correct IP:port combo or the custom url. // You will need to handle domain -> raw IP redirection yourself. if(process.env.PORT) { - const port = process.env.PORT; + const port = process.env.PORT; // Set port variable to the value in .env logger2 .success('Custom port is set. Using custom port ' + port) app.listen(port, () => { @@ -34,7 +33,7 @@ if(process.env.PORT) { const id = path.substring(0, path.length - 4).split('-')[1]; return { id: parseInt(id), - url: 'https://' + customurl + id, + url: 'https://' + customurl + '/' + id, }; }