aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build/index.js9
-rw-r--r--src/index.ts9
2 files changed, 14 insertions, 4 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 {
diff --git a/src/index.ts b/src/index.ts
index de3e21f..0500df6 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -7,7 +7,7 @@ import express from 'express'
const app = express()
-export const debug = true
+export const debug = false
const mainSiteUrl = 'https://skyblock.matdoes.dev'
@@ -30,8 +30,13 @@ app.use((req, res, next) => {
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) => {