Skip to content

basalt / webhooks-sqlite/src / sqliteWebhookStore

Function: sqliteWebhookStore() ​

> sqliteWebhookStore(dbOrLocation?): SqliteWebhooksStores

Defined in: webhooks-sqlite/src/index.ts:190

Open a database (or reuse a DatabaseSync) and return the webhook store wired to it, named to drop straight into webhooksPlugin:

ts
const webhooks = sqliteWebhookStore('./data/webhooks.db')
webhooksPlugin({ store: webhooks.store, secret: process.env.WEBHOOK_SECRET })

Parameters ​

dbOrLocation? ​

string | DatabaseSync

Returns ​

SqliteWebhooksStores

Released under the MIT License.