@notifykitjs/realtime-pg
v0.0.1
Published
Postgres LISTEN/NOTIFY realtime adapter for NotifyKit.
Readme
@notifykit/realtime-pg
Postgres LISTEN/NOTIFY real-time adapter for NotifyKit. Broadcasts events across multiple server instances using Postgres pub/sub.
Install
npm install @notifykit/realtime-pgRequires notifykit as a peer dependency.
Usage
import { pgRealtimeAdapter } from "@notifykit/realtime-pg";
const realtime = pgRealtimeAdapter({
connection: pgClient, // must support listen/unlisten/notify
});
await realtime.start();
const notify = createNotifyKit({
// ...
realtime,
});Useful when running multiple server instances — events published on one instance are received by listeners on all instances via Postgres.
Docs
Full documentation: github.com/reyabsaluja/notifykit
