Commit 32b6a0a
authored
Allow connecting local dbs just by name (#997)
Currently, if I am connecting to a local db server, I need to specify
the full URL:
```
turso db shell http://sunny-doomsday-local-user.localhost:9090
```
if I just specify the name, I get an error:
```
turso db shell sunny-doomsday
Error: failed to connect to database. err: failed to execute SQL:
Post "https://sunny-doomsday-local-user.localhost:9090/v2/pipeline": http: server gave HTTP response to HTTPS client
exit status 1
```
so to fix this, if we find the db to be running locally, then we
fallback to http and then we can connect to the local dbs just by the
name2 files changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
43 | 48 | | |
44 | 49 | | |
45 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
91 | 95 | | |
92 | 96 | | |
93 | 97 | | |
| |||
372 | 376 | | |
373 | 377 | | |
374 | 378 | | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
0 commit comments