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 /src/index.ts | |
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 'src/index.ts')
-rw-r--r-- | src/index.ts | 9 |
1 files changed, 7 insertions, 2 deletions
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) => { |