createPostgresStorage
function createPostgresStorage(options?): PostgresKvStorage;Defined in: src/storage/postgres.ts:210
Create a Postgres-backed PostgresKvStorage. Connection and table creation are lazy.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? |
PostgresStorageOptions |
Returns
Section titled “Returns”Example
Section titled “Example”import { createPostgresStorage } from "@xtandard/kit/storage/postgres";
const storage = createPostgresStorage({ connectionString: process.env.DATABASE_URL, table: "xtandard_kv" });// or: createPostgresStorage({ client: new PGlite() })