Spaces:
Sleeping
Sleeping
Download src/lib/db.ts from eeshaAI/cellex-web: direct link, hf CLI and curl.
- Browser
- Download file 299 Bytes
-
https://huggingface.co/spaces/eeshaAI/cellex-web/resolve/4a709125dd4f3ebc1a85f6ba76765c8dbd0c90bf/src/lib/db.ts
- Command line
-
hf download hf://spaces/eeshaAI/cellex-web@4a709125dd4f3ebc1a85f6ba76765c8dbd0c90bf/src/lib/db.ts
-
curl -L -o db.ts https://huggingface.co/spaces/eeshaAI/cellex-web/resolve/4a709125dd4f3ebc1a85f6ba76765c8dbd0c90bf/src/lib/db.ts
299 Bytes
| import { PrismaClient } from '@prisma/client' | |
| const globalForPrisma = globalThis as unknown as { | |
| prisma: PrismaClient | undefined | |
| } | |
| export const db = | |
| globalForPrisma.prisma ?? | |
| new PrismaClient({ | |
| log: ['query'], | |
| }) | |
| if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = db |