budibase/datastores/config.template.js

32 lines
559 B
JavaScript
Raw Normal View History

2019-03-19 22:45:21 +01:00
import fs from "fs";
import {mkdir} from "fs";
import {join} from "path";
import {promisify} from 'es6-promisify';
mkdirp = promisify(mkdir);
const getConfig = async () => {
const config = {
local: {
root: "./output/local/files"
},
memory: {}
};
try {
await mkdir("./output");
} catch(e){}
for(let type in config) {
await mkdir(join("output", type));
}
await mkdir("./output/local/files");
return config;
};
export default getConfig;