Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Viewing all articles
Browse latest Browse all 1541

Doing call to prisma client from load function in Svelte Kit

$
0
0

I'm using Prisma.io to write a database and would like to call the Prisma client from a typescript function.

I tried to use the load function of Svelte kit and also writing the call in a hidden _api.ts file but it didn't work. The Prisma client is complaining that it cannot be run from the browser. I understand it should somehow be run only on the server. What is the proper way to use Prisma with Svelte kit and run calls on the server?


Viewing all articles
Browse latest Browse all 1541

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>