@rawdash/adapter-turso
v0.1.1
Published
Rawdash Turso/libsql adapter
Downloads
63
Readme
@rawdash/adapter-turso
Turso / libSQL storage adapter for rawdash.
What it is
@rawdash/adapter-turso is a ServerStorage implementation backed by Turso (libSQL). It stores connector sync state and all widget data — events, entities, metrics, edges, distributions — in a Turso database, making them persistent across restarts and available across replicated edge deployments.
Use this with @rawdash/server or @rawdash/mcp anywhere you need durable storage.
Install
npm install @rawdash/adapter-tursoQuick example
import { TursoStorage } from '@rawdash/adapter-turso';
import { GitHubActionsConnector } from '@rawdash/connector-github';
import { secret } from '@rawdash/core';
import { serve } from '@rawdash/server';
const storage = new TursoStorage({
url: process.env.TURSO_DATABASE_URL!,
authToken: process.env.TURSO_AUTH_TOKEN,
});
const github = new GitHubActionsConnector({
owner: 'my-org',
repo: 'my-repo',
token: secret('GITHUB_TOKEN'),
});
serve({ connectors: [{ connector: github }], dashboards: {} }, { storage });Configuration
| Option | Type | Required | Description |
| ----------- | -------- | -------- | --------------------------------------------------------------------------- |
| url | string | Yes | Turso database URL (e.g. libsql://your-db.turso.io) |
| authToken | string | No | Auth token for remote databases. Omit for local file URLs (file:./dev.db) |
Local development
For local development, use a file-based libSQL database:
const storage = new TursoStorage({ url: 'file:./rawdash.db' });No auth token needed. The adapter runs migrations automatically on first use.
Links
License
Apache-2.0
