diff options
author | mat <github@matdoes.dev> | 2021-05-28 22:06:18 -0500 |
---|---|---|
committer | mat <github@matdoes.dev> | 2021-05-28 22:06:18 -0500 |
commit | e16599d7a2691b482034d40505eff435f400e5f6 (patch) | |
tree | 15bd3c5ed3780b3a1c32cdbe4247cd1491f72d46 /build | |
parent | 98c6c5bbb7959db1a69eb8bc0567f8d5d93ebb14 (diff) | |
download | skyblock-api-e16599d7a2691b482034d40505eff435f400e5f6.tar.gz skyblock-api-e16599d7a2691b482034d40505eff435f400e5f6.tar.bz2 skyblock-api-e16599d7a2691b482034d40505eff435f400e5f6.zip |
add more stuff to index route
Diffstat (limited to 'build')
-rw-r--r-- | build/index.js | 9 |
1 files changed, 7 insertions, 2 deletions
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 { |