Skip to content

Commit

Permalink
add read prefrecnes
Browse files Browse the repository at this point in the history
  • Loading branch information
VovaStelmashchuk committed Sep 1, 2024
1 parent 8b9fa1b commit 25e5ff7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions database/newclient.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const mongoUrl = process.env.DB_URL
const client = new MongoClient(mongoUrl, {
socketTimeoutMS: 10000,
connectTimeoutMS: 10000,
readPreference: 'nearest',
});

client.connect()
Expand Down

0 comments on commit 25e5ff7

Please sign in to comment.