createPostgresStorage
function createPostgresStorage(options?): PostgresEntitlementsStorage;Defined in: src/storage/postgres.ts:59
Create a Postgres-backed PostgresEntitlementsStorage. 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/entitlements/storage/postgres";
const storage = createPostgresStorage({ connectionString: process.env.DATABASE_URL });// or: createPostgresStorage({ client: new PGlite() })