Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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