mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
docs: update sqlocal doc
This commit is contained in:
@@ -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,
|
|
||||||
}),
|
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user