Skip to content

createPostgresCounterStore

function createPostgresCounterStore(options?): PostgresCounterStore;

Defined in: src/counters/postgres.ts:67

Create a Postgres-backed counter store.

Parameter Type
options? PostgresCounterStoreOptions

PostgresCounterStore

import { Pool } from "pg";
import { createPostgresCounterStore } from "@xtandard/entitlements/counters/postgres";
const counters = createPostgresCounterStore({ pool: new Pool({ connectionString: process.env.DATABASE_URL }) });