Files
tatort/src/lib/server/dbService.ts
Chi Cong Tran 76c2e26e8c
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
test persistent storage
2025-10-13 12:44:48 +02:00

14 lines
289 B
TypeScript

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);