Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save JacksonRMC/d96a4fec6731c3876c39acd2d750193b to your computer and use it in GitHub Desktop.
Save JacksonRMC/d96a4fec6731c3876c39acd2d750193b to your computer and use it in GitHub Desktop.
import pubnub from 'pubnub';
let pb = new Pubnub({
publishKey: 'pub-c-34cc14b5-87bc-43e4-8c58-55f6f44ed513',
subscribeKey: 'sub-c-434cd75e-44a3-11e7-b6a4-02ee2ddab7fe'
})
pubnub.subscribe({
channel: 'bart_buddy',
callback: function(arg){console.log(arg);}
})
pubnub.publish({
channel: 'bart_buddy',
message: 'I am made it to this channel woot!!!',
success: function(arg) {console.log(arg);}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment