1
0
Fork 0
mirror of synced 2024-07-06 15:00:49 +12:00
budibase/packages/datastores/index.js
Martin McKeaveney 0d0f635db4 eslint tidy up
2020-02-25 15:46:04 +00:00

29 lines
710 B
JavaScript

import local from "./datastores/local"
import azureBlob from "./datastores/azure-blob"
import memory from "./datastores/memory"
import getConfig from "./config"
import tests from "./tests"
const initialise = async () => {
const type = process.argv[2]
const config = (await getConfig())[type]
switch (type) {
case "local":
return { datastore: local(config.root), config }
case "memory":
return { datastore: memory(config), config }
case "azure":
return { datastore: azureBlob(config), config }
default:
break
}
}
initialise()
.then(init => {
return tests(init.datastore, init.config)
})
.then(() => console.log("done"))
.catch(e => console.log(e))