1
0
mirror of https://git.sr.ht/~cadence/cloudtube synced 2024-12-22 05:06:57 +00:00
cloudtube/utils/db.js
2020-09-24 00:05:02 +12:00

9 lines
253 B
JavaScript

const sqlite = require("better-sqlite3")
const pj = require("path").join
const fs = require("fs")
const dir = pj(__dirname, "../db")
fs.mkdirSync(pj(dir, "backups"), {recursive: true})
const db = new sqlite(pj(dir, "cloudtube.db"))
module.exports = db