1
0
mirror of https://github.com/seejohnrun/haste-server.git synced 2025-12-13 18:35:57 +00:00
Files
haste-server/src/lib/document-stores/builder.ts
2022-06-07 10:50:51 +02:00

13 lines
300 B
TypeScript

import type { Config } from 'src/types/config'
import { Store } from '.'
const build = async (config: Config): Promise<Store> => {
const DocumentStore = (
await import(`../document-stores/${config.storage.type}`)
).default
return new DocumentStore(config.storage)
}
export default build