How to integrate sqlite3 in Sveltekit?
Asked Answered
P

2

8

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.

Paginal answered 7/4, 2021 at 12:26 Comment(1)
@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
M
0

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.

Masquer answered 8/6, 2021 at 19:29 Comment(0)
B
0

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.

Borstal answered 31/7, 2022 at 8:38 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.