forked from external-repos/noisedash
Fix db creation path
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
const sqlite3 = require('sqlite3')
|
const sqlite3 = require('sqlite3')
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
|
const path = require('path')
|
||||||
|
|
||||||
if (!fs.existsSync('db')) {
|
if (!fs.existsSync(path.join(__dirname, '../db'))) {
|
||||||
fs.mkdirSync('db')
|
fs.mkdirSync(path.join(__dirname, '../db'))
|
||||||
}
|
}
|
||||||
module.exports = new sqlite3.Database('db/db.sqlite3')
|
module.exports = new sqlite3.Database('db/db.sqlite3')
|
||||||
|
|||||||
Reference in New Issue
Block a user