mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-01 22:51:07 -05:00
1f566c3556
Upgrade the Mongo driver in docstore GitOrigin-RevId: 35e5de558e7900fcb455f1044703912077273d47
16 lines
337 B
JavaScript
16 lines
337 B
JavaScript
const Settings = require('@overleaf/settings')
|
|
const { MongoClient, ObjectId } = require('mongodb')
|
|
|
|
const mongoClient = new MongoClient(Settings.mongo.url)
|
|
const mongoDb = mongoClient.db()
|
|
|
|
const db = {
|
|
docs: mongoDb.collection('docs'),
|
|
docOps: mongoDb.collection('docOps'),
|
|
}
|
|
|
|
module.exports = {
|
|
db,
|
|
mongoClient,
|
|
ObjectId,
|
|
}
|