Put db in config file (WHY IS THIS NOT WORKING)
This commit is contained in:
parent
0d251b212e
commit
74af6218e0
|
@ -1,11 +1,16 @@
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
|
const fs = require('fs')
|
||||||
const os = require('os')
|
const os = require('os')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const sqlite3 = require('sqlite3').verbose()
|
const sqlite3 = require('sqlite3').verbose()
|
||||||
const squel = require('squel')
|
const squel = require('squel')
|
||||||
|
|
||||||
const DB_FILE = path.join(os.homedir(), '.intval3.db')
|
const DB_DIR = path.join(os.homedir(), '.config/intval3/)
|
||||||
|
if (!fs.existsSync(DB_DIR)) {
|
||||||
|
fs.mkdirSync(DB_DIR)
|
||||||
|
}
|
||||||
|
const DB_FILE = path.join(os.homedir(), '.config/intval3/intval3.db')
|
||||||
const db = new sqlite3.Database(DB_FILE)
|
const db = new sqlite3.Database(DB_FILE)
|
||||||
|
|
||||||
class DB {
|
class DB {
|
||||||
|
|
Loading…
Reference in New Issue