Skip to content

Commit 5bb2d43

Browse files
fix: create a function for mongoOptions
2 parents 12b2b7b + 7db09ab commit 5bb2d43

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

server/utils/mongoConstants.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
function getMongoOptions() {
2-
return process.env.MONGO_PORT === '27017'
3-
? ''
4-
: '?readPreference=secondary';
2+
return '?readPreference=secondary';
53
}
64
function getMongoUri() {
75
return `mongodb://${process.env.MONGO_BASE_URI}:${process.env.MONGO_PORT}/${

0 commit comments

Comments
 (0)