Skip to content

shoehive/store/sqlite

shoehive/store/sqlite: the SQLite Store adapter (ADR 0009), built on better-sqlite3 (an optional peer dependency: install it next to shoehive).

import { createServer } from 'shoehive/server';
import { sqliteStore } from 'shoehive/store/sqlite';
const server = createServer({ games, store: sqliteStore({ file: './shoehive.db' }) });

Tables survive a process restart: on startup the server lists the open tables, loads each snapshot and replays the log after it. Several apps can share one file by giving each a different tablePrefix.

Re-exports SessionRecord


Re-exports Store


Re-exports StoreConflictError


Re-exports StoredEntry


Re-exports StoredSnapshot