MCPcopy Create free account
hub / github.com/prisma/prisma-examples / prismaClientSingleton

Function prismaClientSingleton

orm/nuxt/prisma/db.ts:5–8  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import { PrismaClient } from './generated/client'
4
5const prismaClientSingleton = () => {
6 const pool = new PrismaPg({ connectionString: process.env.DATABASE_URL! })
7 return new PrismaClient({ adapter: pool })
8}
9
10type PrismaClientSingleton = ReturnType<typeof prismaClientSingleton>
11

Callers 1

db.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected