@rawdash/adapter-sqlite
v0.28.0
Published
Rawdash SQLite storage adapter for local development (file-backed, survives restarts)
Readme
@rawdash/adapter-sqlite
File-backed SQLite ServerStorage for rawdash. Designed for local OSS
development: drop a single file in .rawdash/storage.sqlite, survive dev
server restarts, never burn through API rate limits cold-starting on every
file change.
Internally a thin wrapper over @rawdash/adapter-libsql pointed
at a local file via libSQL's file: URL scheme — same schema, same
migrations, same advisory-lock semantics.
Install
npm install @rawdash/adapter-sqliteQuick example
import { serve as honoServe } from '@hono/node-server';
import { SqliteStorage } from '@rawdash/adapter-sqlite';
import { mountEngine } from '@rawdash/hono';
import config from './rawdash.config';
const storage = new SqliteStorage('.rawdash/storage.sqlite');
const { app } = mountEngine(config, { storage });
honoServe({ fetch: app.fetch, port: 8080 });The parent directory is created automatically. To opt out, pass
{ ensureDir: false }.
Resetting
Nuke the file (or its containing directory) to start fresh:
rm -rf .rawdashLicense
Apache-2.0
