Prisma, D1, and Svelte: Best way to handle PrismaClient
I'm wondering if this is really the best way to go about handling my PrismaClient instance? I am unable to access DB and such via $env/dynamic/private, and thus I'm forced to get it from the platform this way. But I'm not sure if this is a development limitation or if that would occur in a production environment as well.
1 Reply
That's
hooks.server.ts
for anyone wondering
I guess my real question is if there's a way I'd be able to get the DB: D1Database
instance from the app environment via $env/dynamic/private