overleaf/services/history-v1/storage/lib/mongodb.js

13 lines
457 B
JavaScript
Raw Normal View History

const config = require('config')
const { MongoClient } = require('mongodb')
const client = new MongoClient(config.mongo.uri)
const db = client.db()
const chunks = db.collection('projectHistoryChunks')
const blobs = db.collection('projectHistoryBlobs')
const globalBlobs = db.collection('projectHistoryGlobalBlobs')
const shardedBlobs = db.collection('projectHistoryShardedBlobs')
module.exports = { client, db, chunks, blobs, globalBlobs, shardedBlobs }