import Database from 'better-sqlite3'; import fs from 'fs'; import path from 'path'; import { DB_FULLPATH } from '../../routes'; const fullPath = DB_FULLPATH; const dir = path.dirname(fullPath); if (!fs.existsSync(dir)) { fs.mkdirSync(dir); } export const db = new Database(fullPath);