docs: update sqlocal doc

This commit is contained in:
dswbx
2025-12-02 14:16:27 +01:00
parent 731b7a7e8d
commit a21d4ad6a7

View File

@@ -188,23 +188,20 @@ export default serve<Env>({
### SQLocal ### SQLocal
To use bknd with `sqlocal` for a offline expierence, you need to install the `@bknd/sqlocal` package. You can do so by running the following command: To use bknd with `sqlocal` for a offline expierence, you need to install the `sqlocal` package. You can do so by running the following command:
```bash ```bash
npm install @bknd/sqlocal npm install sqlocal
``` ```
This package uses `sqlocal` under the hood. Consult the [sqlocal documentation](https://sqlocal.dallashoffman.com/guide/setup) for connection options: Consult the [sqlocal documentation](https://sqlocal.dallashoffman.com/guide/setup) for connection options:
```ts ```ts
import { createApp } from "bknd"; import { createApp, sqlocal } from "bknd";
import { SQLocalConnection } from "@bknd/sqlocal"; import { SQLocalKysely } from "sqlocal/kysely";
const app = createApp({ const app = createApp({
connection: new SQLocalConnection({ connection: sqlocal(new SQLocalKysely(":localStorage:")),
databasePath: ":localStorage:",
verbose: true,
}),
}); });
``` ```