createPostgresCounterStore
function createPostgresCounterStore(options?): PostgresCounterStore;Defined in: src/counters/postgres.ts:67
Create a Postgres-backed counter store.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? |
PostgresCounterStoreOptions |
Returns
Section titled “Returns”Example
Section titled “Example”import { Pool } from "pg";import { createPostgresCounterStore } from "@xtandard/entitlements/counters/postgres";
const counters = createPostgresCounterStore({ pool: new Pool({ connectionString: process.env.DATABASE_URL }) });