Spaces:
Runtime error
Runtime error
Download src/server/db.ts from Ali-Developments/COURTRIX: direct link, hf CLI and curl.
- Browser
- Download file 361 Bytes
-
https://huggingface.co/spaces/Ali-Developments/COURTRIX/resolve/main/src/server/db.ts
- Command line
-
hf download hf://spaces/Ali-Developments/COURTRIX/src/server/db.ts
-
curl -L -o db.ts https://huggingface.co/spaces/Ali-Developments/COURTRIX/resolve/main/src/server/db.ts
361 Bytes
| import { PrismaClient } from "@prisma/client"; | |
| const globalForPrisma = globalThis as unknown as { | |
| prisma?: PrismaClient; | |
| }; | |
| export const db = | |
| globalForPrisma.prisma ?? | |
| new PrismaClient({ | |
| log: process.env.NODE_ENV === "development" ? ["warn", "error"] : ["error"], | |
| }); | |
| if (process.env.NODE_ENV !== "production") { | |
| globalForPrisma.prisma = db; | |
| } | |