mongodb.js 315 B

123456789101112131415
  1. const Settings = require('@overleaf/settings')
  2. const { MongoClient, ObjectId } = require('mongodb')
  3. const mongoClient = new MongoClient(Settings.mongo.url)
  4. const mongoDb = mongoClient.db()
  5. const db = {
  6. notifications: mongoDb.collection('notifications'),
  7. }
  8. module.exports = {
  9. db,
  10. mongoClient,
  11. ObjectId,
  12. }