prisma-examples
prisma-examples copied to clipboard
QwikJS Example?
Hi, I was wondering if you guys can create a Qwik example as well for best practices such as you've for NextJS:
let prisma: PrismaClient
if (process.env.NODE_ENV === 'production') {
prisma = new PrismaClient()
} else {
if (!global || !global.prisma) {
global.prisma = new PrismaClient()
}
prisma = global.prisma
}
export default prisma
Above throws errors and issues in a QwikJS Project.
What about this?
- src/entry.ssr.tsx
... export const prisma: PrismaClient = new PrismaClient(); ...