Allow configuring http
Libsql Client Ts: allow configuring http. The verified fix is Fix: For plaintext local dev, pass an explicit `http:` or `ws:` URL (e.g. the service URL for that host and port), or use the `?tls=0` query parameter added in 0.2.0. Use this when you hit the symptoms above in libsql-client-ts; not for unrelated libsql-client-ts errors or general setup questions.
TL;DR
Fix: For plaintext local dev, pass an explicit http: or ws: URL (e.g. the service URL for that host and port), or use the ?tls=0 query parameter added in 0.2.0. Also note: turso dev only speaks a very old HTTP API the client can't talk to - run sqld directly for a compatible local server.
The error
Issue tursodatabase/libsql-client-ts#39 (closed, 11 comments): When using a local database, e.g. `libsql://YOUR_HOST:3030`, this library would use `https`. This fails because I can't access YOUR_HOST over https. Please allow me to disable https, so that I can connect to a local client over HTTP. I'm using Cloudflare Workers so it seems like I cannot use the file directly.Fix
- For plaintext local dev, pass an explicit
http:orws:URL (e.g. the service URL for that host and port), or use the?tls=0query parameter added in 0.2.0. - Also note:
turso devonly speaks a very old HTTP API the client can't talk to - runsqlddirectly for a compatible local server.
Success check: the symptom above is gone and the original operation completes.
When to use
- You hit this exact symptom in libsql-client-ts.
- You want the verified fix without digging through the thread.
When not to use
- A different error in libsql-client-ts, even a similar-looking one.
- General libsql-client-ts setup or credential questions.
Compatibility
- Libsql Client Ts (tursodatabase/libsql-client-ts)
Variant phrasings
- How to fix "allow configuring http" in libsql-client-ts
- libsql-client-ts: allow configuring http
Source
- https://github.com/tursodatabase/libsql-client-ts/issues/39