cloudflare + better-auth and turso

How to setup this in cloudflare any idea
No description
11 Replies
Ping
Ping2w ago
Are you using Hono?
jussmor
jussmorOP2w ago
Not openNextJS
jussmor
jussmorOP2w ago
GitHub
GitHub - JussMor/fazTenant
Contribute to JussMor/fazTenant development by creating an account on GitHub.
Ping
Ping2w ago
I can't find a "createClient" in the Better Auth codebase. Hmm. Thanks, I'll check it out.
jussmor
jussmorOP2w ago
The following example shows how to make a query to your Turso database in a Worker. The credentials needed to connect to Turso have been automatically added as secrets to your Worker through the integration. import { Client as LibsqlClient, createClient } from "@libsql/client/web";
jussmor
jussmorOP2w ago
Cloudflare Docs
Turso · Cloudflare Workers docs
Turso is an edge-hosted, distributed database based on libSQL, an open-source fork of SQLite. Turso was designed to minimize query latency for applications where queries comes from anywhere in the world.
jussmor
jussmorOP2w ago
This is what i find interesting not sure if the problem is the way how i do the import
Ping
Ping2w ago
Do you think you can try what they did?
jussmor
jussmorOP2w ago
I think the problem can be solved adding a layer of compatibility but how can I do one some example? Because it’s something like coudflare offer the layer and doesn’t let you bundle another one
Ping
Ping2w ago
I'm not too sure, sorry.
jussmor
jussmorOP2w ago
Solved was easy tomorrow I published the package

Did you find this page helpful?