Skip to content

Commit

Permalink
mongo: Force readPreference default value to primary
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjD90 committed Oct 16, 2023
1 parent a5fa7c4 commit 7154b41
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/mongo-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export class MongoUtils {
}

const optionsWithDefaultValuesApplied: mongodb.MongoClientOptions = {
readPreference: 'primary', // https://www.mongodb.com/docs/manual/core/read-preference/
heartbeatFrequencyMS: 3_000,
driverInfo: {
name: '@neo9/n9-mongodb-client',
Expand Down

0 comments on commit 7154b41

Please sign in to comment.