From 4b78c2fbdfcdd9dcc794e4b0c17cfb6d88a1006b Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Sat, 1 May 2021 19:04:52 -0500 Subject: 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 --- src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/index.ts') 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 :)')) -- cgit