update app create config to accept libsql config directly

This commit is contained in:
dswbx
2025-02-12 09:21:51 +01:00
parent f466dd166d
commit 2c6a4d2bed
20 changed files with 59 additions and 100 deletions

View File

@@ -18,10 +18,7 @@ The easiest to get started is using SQLite as a file. When serving the API in th
the function accepts an object with connection details. To use a file, use the following:
```json
{
"type": "libsql",
"config": {
"url": "file:<path/to/your/database.db>"
}
"url": "file:<path/to/your/database.db>"
}
```
Please note that using SQLite as a file is only supported in server environments.
@@ -36,10 +33,7 @@ turso dev
The command will yield a URL. Use it in the connection object:
```json
{
"type": "libsql",
"config": {
"url": "http://localhost:8080"
}
"url": "http://localhost:8080"
}
```
@@ -48,11 +42,8 @@ If you want to use LibSQL on Turso, [sign up for a free account](https://turso.t
connection object to your new database:
```json
{
"type": "libsql",
"config": {
"url": "libsql://your-database-url.turso.io",
"authToken": "your-auth-token"
}
"url": "libsql://your-database-url.turso.io",
"authToken": "your-auth-token"
}
```