feat: page cache + save/load logic + db fixes

This commit is contained in:
Nicolas Giard
2018-09-15 20:58:23 -04:00
parent 572393aa7b
commit 2c6a95f900
9 changed files with 159 additions and 66 deletions

View File

@@ -90,10 +90,10 @@ module.exports = () => {
}
// Create directory structure
const tmpPath = path.join(os.tmpdir(), 'wikijs')
await fs.ensureDir(tmpPath)
await fs.ensureDir(path.join(tmpPath, 'cache'))
await fs.ensureDir(path.join(tmpPath, 'uploads'))
const dataPath = path.join(process.cwd(), 'data')
await fs.ensureDir(dataPath)
await fs.ensureDir(path.join(dataPath, 'cache'))
await fs.ensureDir(path.join(dataPath, 'uploads'))
// Set config
_.set(WIKI.config, 'defaultEditor', 'markdown')