When using Drizzle-Kit in something like SvelteKit, how should I handle the schema.ts?

Should I just let my entire drizzle folder sit inside my lib directory?
1 Reply
nickmazuk
nickmazuk16mo ago
I'd recommend src/lib/server because Sveltekit will prevent you from accidentally importing anything from that folder into the client. That way, it's harder to accidentally leak your database secrets. https://kit.svelte.dev/docs/server-only-modules#your-modules
SvelteKit docs
Server-only modules • SvelteKit documentation
Want results from more Discord servers?
Add your server