mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-26 05:41:43 +00:00
f9aaa4d5de
Upgrade the Mongo driver in the chat service GitOrigin-RevId: 12808e624b75f0adc7fd474f774b855dc2eadefd
16 lines
348 B
JavaScript
16 lines
348 B
JavaScript
const Settings = require('@overleaf/settings')
|
|
const { MongoClient, ObjectId } = require('mongodb')
|
|
|
|
const client = new MongoClient(Settings.mongo.url)
|
|
const db = client.db()
|
|
|
|
const collections = {
|
|
messages: db.collection('messages'),
|
|
rooms: db.collection('rooms'),
|
|
}
|
|
|
|
module.exports = {
|
|
db: collections,
|
|
mongoClient: client,
|
|
ObjectId,
|
|
}
|