Spaces:
Runtime error
Runtime error
Download lib/db/src/index.ts from o134/Desinger-System: direct link, hf CLI and curl.
- Browser
- Download file 385 Bytes
-
https://huggingface.co/spaces/o134/Desinger-System/resolve/main/lib/db/src/index.ts
- Command line
-
hf download hf://spaces/o134/Desinger-System/lib/db/src/index.ts
-
curl -L -o index.ts https://huggingface.co/spaces/o134/Desinger-System/resolve/main/lib/db/src/index.ts
385 Bytes
| import { drizzle } from "drizzle-orm/postgres-js"; | |
| import postgres from "postgres"; | |
| import * as schema from "./schema"; | |
| const connectionString = process.env.DATABASE_URL; | |
| if (!connectionString) { | |
| throw new Error("DATABASE_URL environment variable is not set"); | |
| } | |
| const client = postgres(connectionString); | |
| export const db = drizzle(client, { schema }); | |
| export * from "./schema"; | |