From e16599d7a2691b482034d40505eff435f400e5f6 Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 28 May 2021 22:06:18 -0500 Subject: add more stuff to index route --- build/index.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'build') diff --git a/build/index.js b/build/index.js index dd6c3b6..e6ecf13 100644 --- a/build/index.js +++ b/build/index.js @@ -30,7 +30,7 @@ const constants = __importStar(require("./constants")); const discord = __importStar(require("./discord")); const express_1 = __importDefault(require("express")); const app = express_1.default(); -exports.debug = true; +exports.debug = false; const mainSiteUrl = 'https://skyblock.matdoes.dev'; // 200 requests over 5 minutes const limiter = express_rate_limit_1.default({ @@ -50,8 +50,13 @@ app.use((req, res, next) => { res.setHeader('Access-Control-Allow-Origin', '*'); next(); }); +const startTime = Date.now(); app.get('/', async (req, res) => { - res.json({ ok: true }); + const currentTime = Date.now(); + res.json({ + ok: true, + uptimeHours: (currentTime - startTime) / 1000 / 60 / 60 + }); }); app.get('/player/:user', async (req, res) => { try { -- cgit