diff --git a/server/db.js b/server/db.js index 4f0b180..c394d72 100644 --- a/server/db.js +++ b/server/db.js @@ -1,7 +1,8 @@ const sqlite3 = require('sqlite3') const fs = require('fs') +const path = require('path') -if (!fs.existsSync('db')) { - fs.mkdirSync('db') +if (!fs.existsSync(path.join(__dirname, '../db'))) { + fs.mkdirSync(path.join(__dirname, '../db')) } module.exports = new sqlite3.Database('db/db.sqlite3')