createMongoCounterStore
function createMongoCounterStore(options): MongoCounterStore;Defined in: src/counters/mongodb.ts:93
Create a MongoDB-backed counter store. Connection (and the TTL index) is lazy — set up on the first operation.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options |
MongoCounterStoreOptions |
Returns
Section titled “Returns”Example
Section titled “Example”import { createMongoCounterStore } from "@xtandard/entitlements/counters/mongodb";const counters = createMongoCounterStore({ url: process.env.MONGODB_URL, dbName: "myapp" });