Skip to content

@xtandard/webhooks/storage/mongodb

MongoDB storage: createMongoStorage() over the mongodb driver, one collection of { _id: key, value } documents.

import { … } from "@xtandard/webhooks/storage/mongodb";
Name Summary
createMongoStorage Create a MongoDB-backed MongoWebhooksStorage.
Name Summary
MongoStorageOptions Options for createMongoStorage. dbName defaults to "xtandard_webhooks", collectionName to "webhooks_kv".
MongoWebhooksStorage A compare-and-swap capable WebhooksStorage backed by MongoDB, plus a close() method that disconnects the client — but only the one this adapter created. A client you passed in is left for you to manage.