feat: initial backend store prototype
Some checks failed
Deploy to GitHub Pages / build_site (push) Failing after 13s

This commit is contained in:
2024-12-17 18:15:21 +01:00
parent 5421349c79
commit 9d4d67f086
32 changed files with 2012 additions and 76 deletions

15
store/src/db/db.ts Normal file
View File

@ -0,0 +1,15 @@
import { drizzle } from "drizzle-orm/node-postgres";
import pg from "pg";
import * as schema from "./schema.ts";
// Use pg driver.
const { Pool } = pg;
// Instantiate Drizzle client with pg driver and schema.
export const db = drizzle({
client: new Pool({
connectionString: Deno.env.get("DATABASE_URL"),
}),
schema,
});

2
store/src/db/schema.ts Normal file
View File

@ -0,0 +1,2 @@
export * from "../routes/user/user.schema.ts";
export * from "../routes/node/node.schema.ts";