overleaf/services/docstore/app/js/mongodb.js
Eric Mc Sween 1f566c3556 Merge pull request #10911 from overleaf/em-upgrade-mongo-docstore
Upgrade the Mongo driver in docstore

GitOrigin-RevId: 35e5de558e7900fcb455f1044703912077273d47
2022-12-16 09:02:59 +00:00

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,
}