SvelteKit (Vite) + D1 + Prisma Local development
I have a SvelteKit app that I'm developing with a D1 database accessed through Prisma.
I'm trying to run the Vite development server locally and have it connect to D1 locally.
My app works when deployed to workers (with experimental assets enabled), and can read/write from the D1 database via Prisma.
The code to initialize my database connection is:
Running locally, I typically run
Is there a way to get
If not, is there a way to get that running so that my local dev environment could write to a real/hosted D1 instance that I specify?
Let me know if there's other info that could be helpful
I'm trying to run the Vite development server locally and have it connect to D1 locally.
My app works when deployed to workers (with experimental assets enabled), and can read/write from the D1 database via Prisma.
The code to initialize my database connection is:
Running locally, I typically run
vite dev --hostIs there a way to get
vite dev running so that it can access a local D1 Instance provided by Wrangler?If not, is there a way to get that running so that my local dev environment could write to a real/hosted D1 instance that I specify?
Let me know if there's other info that could be helpful