mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-07 08:09:01 +02:00
e06dd13ee1
Upgrade the Mongo driver in the chat service GitOrigin-RevId: 12808e624b75f0adc7fd474f774b855dc2eadefd
17 lines
348 B
JavaScript
17 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,
|
|
}
|