mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
[misc] mongodb: use the new db connector by default
mongojs was enabling it by default as well.
This commit is contained in:
parent
b37e27f023
commit
3644db6848
2 changed files with 10 additions and 2 deletions
|
@ -1,7 +1,10 @@
|
|||
const Settings = require('settings-sharelatex')
|
||||
const { MongoClient, ObjectId } = require('mongodb')
|
||||
|
||||
const clientPromise = MongoClient.connect(Settings.mongo.url)
|
||||
const clientPromise = MongoClient.connect(
|
||||
Settings.mongo.url,
|
||||
Settings.mongo.options
|
||||
)
|
||||
|
||||
let setupDbPromise
|
||||
async function waitForDb() {
|
||||
|
|
|
@ -14,7 +14,12 @@ const Settings = {
|
|||
}
|
||||
},
|
||||
|
||||
mongo: {},
|
||||
mongo: {
|
||||
options: {
|
||||
useUnifiedTopology:
|
||||
(process.env.MONGO_USE_UNIFIED_TOPOLOGY || 'true') === 'true'
|
||||
}
|
||||
},
|
||||
|
||||
docstore: {
|
||||
backend: process.env.BACKEND || 's3',
|
||||
|
|
Loading…
Reference in a new issue