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