mirror of
https://github.com/seejohnrun/haste-server.git
synced 2025-12-13 18:35:57 +00:00
13 lines
300 B
TypeScript
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
|