overleaf/services/docstore/app/js/mongodb.js
Eric Mc Sween ab2c5bcf2a Merge pull request #15720 from overleaf/em-remove-docops-code
Remove code related to the docOps collection

GitOrigin-RevId: 38c1f752edda1cec4ed7051a0dba18b16ae4c754
2024-01-23 09:03:27 +00:00

18 lines
387 B
JavaScript

const Metrics = require('@overleaf/metrics')
const Settings = require('@overleaf/settings')
const { MongoClient, ObjectId } = require('mongodb-legacy')
const mongoClient = new MongoClient(Settings.mongo.url)
const mongoDb = mongoClient.db()
const db = {
docs: mongoDb.collection('docs'),
}
Metrics.mongodb.monitor(mongoClient)
module.exports = {
db,
mongoClient,
ObjectId,
}