mirror of
https://github.com/orangecoding/fredy.git
synced 2026-06-16 12:31:07 +00:00
ensure db folder exists
This commit is contained in:
6
index.js
6
index.js
@@ -1,4 +1,10 @@
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
|
||||||
|
//if db folder does not exist, ensure to create it before loading anything else
|
||||||
|
if (!fs.existsSync('./db')) {
|
||||||
|
fs.mkdirSync('./db');
|
||||||
|
}
|
||||||
|
|
||||||
const path = './lib/provider';
|
const path = './lib/provider';
|
||||||
const provider = fs.readdirSync(path).filter((file) => file.endsWith('.js'));
|
const provider = fs.readdirSync(path).filter((file) => file.endsWith('.js'));
|
||||||
const config = require('./conf/config.json');
|
const config = require('./conf/config.json');
|
||||||
|
|||||||
Reference in New Issue
Block a user