What if you want to use prisma with multiple endpoints? Do you generate a client for each endpoint, or do you export it and import it in every endpoint?
I'd just generate a Prisma client for each endpoint. If you're using some type of serverless endpoint, I'd generate the Prisma client outside of the called function so only one client is generated (using node's caching).
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
What if you want to use prisma with multiple endpoints? Do you generate a client for each endpoint, or do you export it and import it in every endpoint?
I'd just generate a Prisma client for each endpoint. If you're using some type of serverless endpoint, I'd generate the Prisma client outside of the called function so only one client is generated (using node's caching).