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

Function prismaClientSingleton

orm/hapi/src/plugins/prisma.ts:5–8  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import { PrismaPg } from '@prisma/adapter-pg'
4
5const prismaClientSingleton = () => {
6 const pool = new PrismaPg({ connectionString: process.env.DATABASE_URL! })
7 return new PrismaClient({ adapter: pool })
8}
9
10declare module '@hapi/hapi' {
11 interface ServerApplicationState {

Callers 1

prisma.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected