A Next.js 14 application delivering the creator β upload β library β play loop with authentication, Prisma/Postgres, S3-compatible storage, search, and analytics.
41a1d8d
verified
| ```typescript | |
| import { PrismaClient } from "@prisma/client" | |
| declare global { | |
| var prisma: PrismaClient | undefined | |
| } | |
| export const prisma = global.prisma || new PrismaClient() | |
| if (process.env.NODE_ENV !== "production") global.prisma = prisma | |
| ``` |