Skip to content

Instantly share code, notes, and snippets.

@geobabbler
Last active March 7, 2017 20:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geobabbler/45068f225b0787b9b45e4b2d9374d3ee to your computer and use it in GitHub Desktop.
Save geobabbler/45068f225b0787b9b45e4b2d9374d3ee to your computer and use it in GitHub Desktop.
var PGPubsub = require('pg-pubsub');
var pubsubInstance = new PGPubsub('postgres://postgres:user@localhost:5432/database');
pubsubInstance.addChannel('actions', 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