
Security News
Official Go SDK for MCP in Development, Stable Release Expected in August
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.
Postgres PubSub client using NOTIFY/LISTEN
npm install pg-notify
yarn add pg-notify
pnpm add pg-notify
PGPubSub accepts the same config as pg.
import PGPubSub from 'pg-notify'
//const PGPubSub = require('pg-notify')
;(async () => {
const pubsub = new PGPubSub({
connectionString: 'postgres://postgres:postgres@localhost:5432/db'
})
await pubsub.connect()
await pubsub.on('test', (payload) => {
console.log('payload: ', payload)
})
await pubsub.emit('test', 'this is the payload')
await pubsub.emit('test', { foo: 'bar' })
await pubsub.close()
})()
options
(object
) Configuration options for pg-notify pubsub instance. Accepts same options as pg with few custom ones described below.
number
) Maximum number of reconnect attempts after losing connection. Pass 0
to disable reconnecting. Default: 10
.number
) Maximum payload size, exceeding given size will throw an error. Default: 7999
(In the default configuration it must be shorter than 8000 bytes.).channel
(string
)payload
(string
or object
)channel
(string
)listener
(function
accepting single argument payload
)listener
(function
accepting single argument payload
)Contributions, issues and feature requests are welcome!
Copyright © 2020 Aldis Ameriks.
This project is MIT licensed.
FAQs
Postgres pubsub client
The npm package pg-notify receives a total of 5,852 weekly downloads. As such, pg-notify popularity was classified as popular.
We found that pg-notify demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.
Security News
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.