overleaf/services/docstore/app/js/PersistorManager.js

13 lines
437 B
JavaScript
Raw Normal View History

const settings = require('@overleaf/settings')
2020-07-23 18:42:49 +00:00
const persistorSettings = settings.docstore
2020-09-10 17:07:14 +00:00
persistorSettings.Metrics = require('@overleaf/metrics')
2020-07-23 18:42:49 +00:00
const ObjectPersistor = require('@overleaf/object-persistor')
const AbstractPersistor = require('@overleaf/object-persistor/src/AbstractPersistor')
const persistor = settings.docstore.backend
? ObjectPersistor(persistorSettings)
: new AbstractPersistor()
2020-07-23 18:42:49 +00:00
module.exports = persistor