Skip to content

Commit ba5f5f6

Browse files
committed
🔧 Добавлены параметры подключения к MongoDB: timeoutMS, compressors, appName, retryReads и retryWrites
1 parent 164e5a5 commit ba5f5f6

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

app/db/mongo.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ export const connectMongo = async (url: string): Promise<Db> => {
1515
await mongoose.connect(url, {
1616
maxPoolSize: 10,
1717
minPoolSize: 2,
18+
timeoutMS: 1000,
19+
compressors: "none",
20+
appName: "dickobrazz-server",
21+
retryReads: true,
22+
retryWrites: true,
1823
serverSelectionTimeoutMS: 5000,
1924
});
2025

0 commit comments

Comments
 (0)