You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prisma can't be used in components because the database connection is only available at the server, so the connection would fail client-side. Instead, Prisma is used server-side, API calls are routed internally on the server (thanks to Nitro) and done via HTTPS from the client.
Hi,
I have a small question:
Why do you use prisma in the server/api and not directly in a component (with a composable for example)? What is the benefit to use a api?
Thanks for your help
Benjamin
The text was updated successfully, but these errors were encountered: