mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-12 10:00:05 -04:00
Update db.js
This commit is contained in:
parent
0322922c39
commit
d50ff6c2d7
1 changed files with 3 additions and 0 deletions
|
@ -1,8 +1,11 @@
|
||||||
const nedb = require('nedb-promises')
|
const nedb = require('nedb-promises')
|
||||||
|
const fs = require('fs-extra')
|
||||||
const file = require('./file')
|
const file = require('./file')
|
||||||
|
|
||||||
const DB_DIR = process.env.DB_DIR || './scripts/tmp/database'
|
const DB_DIR = process.env.DB_DIR || './scripts/tmp/database'
|
||||||
|
|
||||||
|
fs.ensureDirSync(DB_DIR)
|
||||||
|
|
||||||
class Database {
|
class Database {
|
||||||
constructor(filepath) {
|
constructor(filepath) {
|
||||||
this.filepath = filepath
|
this.filepath = filepath
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue