Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pg-notify

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pg-notify - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

2

package.json
{
"name": "pg-notify",
"version": "0.0.7",
"version": "0.0.8",
"description": "Postgres pubsub client",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -31,2 +31,21 @@ <h1 align="center">Welcome to pg-notify 👋</h1>

## Usage
```js
const PGPubSub = require('pg-notify')
// import PGPubSub from 'pg-notify
;(async () => {
const pubsub = new PGPubSub({
db: { connectionString: 'postgres://postgres:postgres@localhost:5432/db' }
})
await pubsub.connect()
await pubsub.on('test', (payload) => {
console.log('payload: ', payload)
})
await pubsub.emit({ topic: 'test', payload: 'this is the payload' })
})()
```
## Contributing

@@ -33,0 +52,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc