Created
June 1, 2017 16:58
-
-
Save JacksonRMC/d96a4fec6731c3876c39acd2d750193b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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