overleaf/services/notifications/app/js/mongodb.js
Eric Mc Sween efd30fae15 Merge pull request #10939 from overleaf/em-upgrade-mongo-notifications
Upgrade Mongo driver in notifications

GitOrigin-RevId: 3a504471b21873e614e617d81c15c3e17ce7fdc0
2022-12-21 09:05:28 +00:00

15 lines
315 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 = {
notifications: mongoDb.collection('notifications'),
}
module.exports = {
db,
mongoClient,
ObjectId,
}