@alineo-labs/postgres
v0.2.0
Published
Postgres storage adapter for [alineo](https://alineo.tech). Stores the sandbox ledger in a Postgres database — suitable for production deployments where multiple processes or machines share the same ledger.
Readme
@alineo-labs/postgres
Postgres storage adapter for alineo. Stores the sandbox ledger in a Postgres database — suitable for production deployments where multiple processes or machines share the same ledger.
bun add @alineo-labs/postgresFor local development, @alineo-labs/sqlite is simpler and requires no infrastructure.
Usage
import { Sandbox } from "@alineo-labs/sandbox";
import { PostgresAdapter } from "@alineo-labs/postgres";
const client = new Sandbox({
baseUrl: "http://localhost:8080",
adapter: new PostgresAdapter("postgresql://user:pass@localhost:5432/alineo"),
});The adapter initialises lazily on first use and runs idempotent migrations (CREATE TABLE IF NOT EXISTS) on startup — no separate migration step needed.
License
Apache 2.0
