Create datastore folder

This commit is contained in:
Christer Warén 2021-08-04 10:07:11 +03:00
parent 308afd9f96
commit b01ee3b380

View File

@ -8,6 +8,10 @@ module.exports = class {
}
loadData() {
const dir = path.join(path.dirname(__dirname), '../datastore');
if (!fs.existsSync(dir)) {
fs.mkdirSync(dir);
}
//console.log("");
const dataFiles = fs.readdirSync(path.join(path.dirname(__dirname), '../datastore')).filter(f => f.endsWith('.json'));
for (const file of dataFiles) {