13 lines
397 B
TypeScript
13 lines
397 B
TypeScript
import { Database } from "bun:sqlite";
|
|
import * as path from "node:path";
|
|
import { Event } from "./component/event";
|
|
export const db_filename = "77th_eventntfy.db";
|
|
export const db_filepath = path.join("data", "db", db_filename);
|
|
console.log(db_filepath);
|
|
// const db_file = Bun.file(db_filepath);
|
|
|
|
export const db = new Database(db_filepath);
|
|
|
|
export function init () {
|
|
Event.createTable(db);
|
|
} |