[英]How to integrate sqlite3 in Sveltekit?
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.我一直在将 sqlite3 用于我的大多数全栈应用程序(前端的节点/express、django/drf + svelte 作为 api 端点的消费者),并且一直在试图弄清楚如何集成 sqlite3。
As far as I know, better-sqlite3
is a synchronous library.据我所知,
better-sqlite3
是一个同步库。
I notice you're using await
with better-sqlite3
.我注意到您正在使用
await
和better-sqlite3
。 Removing await
might solve your problem.删除
await
可能会解决您的问题。
index.json.ts
didn't work for me for some reason. index.json.ts
由于某种原因对我不起作用。 I had to change it to list.json.ts
.我不得不将其更改为
list.json.ts
。
Also, they changed the endpoint handler to all uppercase GET in this discussion .此外,他们在此讨论中将端点处理程序更改为全部大写的 GET。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.