finished setting up server + added docker compose

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-04-26 23:06:06 -05:00
parent a6848fb7e9
commit 610c9606dc
13 changed files with 684 additions and 30 deletions
+17
View File
@@ -0,0 +1,17 @@
import "dotenv/config";
const isBun = typeof Bun !== "undefined";
export const db = await (async () => {
if (isBun) {
const { SQL } = await import("bun");
const { drizzle } = await import("drizzle-orm/bun-sql");
return drizzle(new SQL(process.env.DATABASE_URL!));
} else {
const { default: postgres } = await import("postgres");
const { drizzle } = await import("drizzle-orm/postgres-js");
return drizzle(postgres(process.env.DATABASE_URL!));
}
})();
export * from "./schema";