diff --git a/.gitignore b/.gitignore index caa6f98fa..d771a4658 100644 --- a/.gitignore +++ b/.gitignore @@ -34,4 +34,4 @@ yarn.lock package.json package-lock.json db.json -server/db backup.json +db backup.json diff --git a/server/src/app.js b/server/src/app.js index a7882c50d..e6d4dd214 100644 --- a/server/src/app.js +++ b/server/src/app.js @@ -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