Skip to content

basalt / webhooks-sqlite/src / openWebhooksDatabase

Function: openWebhooksDatabase() ​

> openWebhooksDatabase(location?): DatabaseSync

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

Durable, SQLite-backed implementation of the @basaltkit/webhooks WebhookStore (the outbound endpoint subscriptions), on Node's built-in node:sqlite. Zero external dependencies. The single-node reference backend; the production (Postgres/MySQL) counterpart is @basaltkit/webhooks-prisma.

MemoryWebhookStore (the default) forgets every registered endpoint on restart — so after a redeploy, nothing is subscribed. This one persists them.

Requires Node 22.5+ (stable and flag-free on Node 24; --experimental-sqlite on 22.x).

Parameters ​

location? ​

string = ':memory:'

Returns ​

DatabaseSync

Released under the MIT License.