refract: tidy up structure

- db in folder
This commit is contained in:
cv
2021-05-28 14:00:13 +02:00
parent 5934166906
commit a47dfea56b
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -34,4 +34,4 @@ yarn.lock
package.json
package-lock.json
db.json
server/db backup.json
db backup.json
+3 -1
View File
@@ -3,8 +3,10 @@ import { config } from './config/config.js';
// init database
import { Low, JSONFile } from 'lowdb';
import { join } from 'path';
const adapter = new JSONFile(config.database.filename);
const file = join('data/', config.database.filename);
const adapter = new JSONFile(file);
export const db = new Low(adapter);
// dependencies