overleaf/services/contacts/app/js/mongodb.js
Alf Eaton c14467b87a Migrate contacts service to ES modules (#10904)
GitOrigin-RevId: c5abb64729530baecbee0eb589eaed39faa2ac56
2022-12-19 09:03:55 +00:00

12 lines
281 B
JavaScript

import Settings from '@overleaf/settings'
import { MongoClient } from 'mongodb'
export { ObjectId } from 'mongodb'
export const mongoClient = new MongoClient(Settings.mongo.url)
const mongoDb = mongoClient.db()
export const db = {
contacts: mongoDb.collection('contacts'),
}