Skip to content

Instantly share code, notes, and snippets.

@geobabbler
Created March 31, 2020 16:44
Show Gist options
  • Save geobabbler/96088b494309550058163ff156e7dd44 to your computer and use it in GitHub Desktop.
Save geobabbler/96088b494309550058163ff156e7dd44 to your computer and use it in GitHub Desktop.
var PGPubsub = require('pg-pubsub');
var pubsubInstance = new PGPubsub('postgres://password:user@host:5432/database');
pubsubInstance.addChannel('jhucounty', function (channelPayload) {
console.log(channelPayload);
console.log('---------------------------------');
console.log(JSON.stringify(channelPayload));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment