mongo connection uri
This commit is contained in:
parent
78d9ac4b74
commit
acfd9cf37f
@ -40,7 +40,7 @@ class MongoDB {
|
||||
this.logger.warn(`No auth provided, proceeding without`);
|
||||
}
|
||||
|
||||
this.URI = `mongodb://${auth}${MONGO_HOST}:${MONGO_PORT}/${MONGO_DB}${AUTH_DB ? `?authSource=${AUTH_DB}` : ''}`;
|
||||
this.URI = `mongodb://${auth}${MONGO_HOST}:${MONGO_PORT}/${AUTH_DB || ''}?readPreference=preferSecondary`;
|
||||
}
|
||||
|
||||
this.client = new MongoClient(this.URI, this.config.options.client);
|
||||
|
Loading…
Reference in New Issue
Block a user