How to integrate sqlite3 in Sveltekit?

Viewed 3264

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.

2 Answers

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.

Related