aboutsummaryrefslogtreecommitdiff
path: root/src/database.ts
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-07-02 16:51:48 -0500
committermat <github@matdoes.dev>2022-07-02 16:51:48 -0500
commitc951bfb32401ee7e21e256bd391230a1cd4278b7 (patch)
tree6be5b48b7448a91720be261a8d27aff9b6fcb38f /src/database.ts
parent4c0649fcf401bf291377a6ab42541b4b567922de (diff)
downloadskyblock-api-c951bfb32401ee7e21e256bd391230a1cd4278b7.tar.gz
skyblock-api-c951bfb32401ee7e21e256bd391230a1cd4278b7.tar.bz2
skyblock-api-c951bfb32401ee7e21e256bd391230a1cd4278b7.zip
bump mongodb version
Diffstat (limited to 'src/database.ts')
-rw-r--r--src/database.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/database.ts b/src/database.ts
index 66edeff..b4b6043 100644
--- a/src/database.ts
+++ b/src/database.ts
@@ -198,7 +198,9 @@ async function connect(): Promise<void> {
return console.warn('Warning: db_uri was not found in .env. Features that utilize the database such as leaderboards won\'t work.')
if (!process.env.db_name)
return console.warn('Warning: db_name was not found in .env. Features that utilize the database such as leaderboards won\'t work.')
- client = await MongoClient.connect(process.env.db_uri)
+ client = await MongoClient.connect(process.env.db_uri, {
+ maxConnecting: 100
+ })
database = client.db(process.env.db_name)
memberLeaderboardsCollection = database.collection('member-leaderboards')
profileLeaderboardsCollection = database.collection('profile-leaderboards')