I have been using sqlite3 for most of my fullstack applications (node/express, django/drf + svelte on the front end as the consumer of the api endpoints) and have been trying to figure out how to integrate sqlite3.
How to integrate sqlite3 in Sveltekit?
Asked Answered
@AnilBhattarai Could you remove the guide part out of the question and post it as an accepted answer? That would fit the stackoverlow model better. (Right now it is marked as an unanswered question) –
Buonarroti
As far as I know, better-sqlite3
is a synchronous library.
I notice you're using await
with better-sqlite3
. Removing await
might solve your problem.
index.json.ts
didn't work for me for some reason. I had to change it to list.json.ts
.
Also, they changed the endpoint handler to all uppercase GET in this discussion.
© 2022 - 2025 — McMap. All rights reserved.