overleaf/services/contacts/app/js/mongodb.js

13 lines
281 B
JavaScript
Raw Normal View History

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'),
}