Skip to content

Instantly share code, notes, and snippets.

@drnugent
Last active August 29, 2015 14:20
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 drnugent/8d20f25efaada99128ed to your computer and use it in GitHub Desktop.
Save drnugent/8d20f25efaada99128ed to your computer and use it in GitHub Desktop.
PubNub git subscribe example
var displayMessages = function(ms) { ms[0].forEach(displayMessage); };
pubnub.history({
channel: 'pubnub-git',
callback: displayMessages,
count: 100
});
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