aboutsummaryrefslogtreecommitdiff
path: root/src/index.ts
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2021-05-01 19:04:52 -0500
committerGitHub <noreply@github.com>2021-05-01 19:04:52 -0500
commit4b78c2fbdfcdd9dcc794e4b0c17cfb6d88a1006b (patch)
tree6e8281984bef6d30cd2988fbf80bfcd22c4f668e /src/index.ts
parent644e9c6629453b07844ca83fab7fbe9a3185b4b6 (diff)
downloadskyblock-api-4b78c2fbdfcdd9dcc794e4b0c17cfb6d88a1006b.tar.gz
skyblock-api-4b78c2fbdfcdd9dcc794e4b0c17cfb6d88a1006b.tar.bz2
skyblock-api-4b78c2fbdfcdd9dcc794e4b0c17cfb6d88a1006b.zip
Show minions that haven't been unlocked in response (#20)
* add minions that haven't been unlocked yet to response, and slightly optimize constants * remove most console.logs with console.debugs * mock constants
Diffstat (limited to 'src/index.ts')
-rw-r--r--src/index.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/index.ts b/src/index.ts
index 06bdc5f..d25efc9 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -7,6 +7,7 @@ const app = express()
export const debug = false
+
// 200 requests over 5 minutes
const limiter = rateLimit({
windowMs: 60 * 1000 * 5,
@@ -69,5 +70,5 @@ app.get('/leaderboards', async(req, res) => {
// only run the server if it's not doing tests
-if (typeof global.it !== 'function')
+if (!globalThis.isTest)
app.listen(8080, () => console.log('App started :)'))