Dorabiamy funkcjonalnosci w TV

This commit is contained in:
dm
2025-12-12 14:58:13 +01:00
parent 0f17daee17
commit ee51e0816d
29 changed files with 1975 additions and 455 deletions

13
src/pages/api/db.js Normal file
View File

@@ -0,0 +1,13 @@
import Database from "better-sqlite3";
const DB_PATH =
process.env.FUZ_DB_PATH || "./src/data/ServicesRange.db";
let db;
export function getDb() {
if (!db) {
db = new Database(DB_PATH, { readonly: true });
}
return db;
}