Join Slack
Powered by
how can i creating a single instance of prisma cli...
# prisma-client
g
Gabriel Alcântara Bernardes
10/01/2020, 8:15 PM
how can i creating a single instance of prisma client and use in entire application for rest api?
n
nikolasburk
10/02/2020, 7:08 AM
Hey Gabriel đź‘‹ I guess one way of doing this would be to create a file e.g. called
prisma.ts
(or
prisma.js
if you're using JS), instantiating
PrismaClient
in it and then import that instance into all other files where you need it 🙂
5
Views
Open in Slack
Previous
Next