Medim
Explore posts from serversUse prisma globally in api routes
I have a question, is it possible to use the prisma client globally without having to import it everytime? I'm using Prisma + Turso so there's a bit more than just two lines of code to use the prisma client so adding it to every api file is a bit tiring, is there a way to make it available as a util/helper globally?
what is the best way to do it?
4 replies