Last active
August 29, 2015 14:20
-
-
Save drnugent/8d20f25efaada99128ed to your computer and use it in GitHub Desktop.
PubNub git subscribe example
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
var displayMessages = function(ms) { ms[0].forEach(displayMessage); }; | |
pubnub.history({ | |
channel: 'pubnub-git', | |
callback: displayMessages, | |
count: 100 | |
}); |
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
pubnub.subscribe({ | |
channel: 'pubnub-git', | |
message: displayLiveMessage | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment