Skip to content

Commit

Permalink
Add support for offline writes
Browse files Browse the repository at this point in the history
This bumps up the libsql package dependency and adds a "offline" flag to
config, which enables offline writes with sync to remote:

Configuration is straight-forward:

```
const config = {
    url: process.env.URL ?? "file:local.db",
    syncUrl: process.env.SYNC_URL,
    authToken: process.env.AUTH_TOKEN,
    offline: true,
};
const db = createClient(config);
```

This puts the database in a mode where writes are always local and
`sync()` pushes changed frames to remote server.
  • Loading branch information
penberg committed Nov 15, 2024
1 parent 494c03c commit 01f001e
Show file tree
Hide file tree
Showing 6 changed files with 148 additions and 43 deletions.
Loading

0 comments on commit 01f001e

Please sign in to comment.