Skip to content

Instantly share code, notes, and snippets.

@stephenlb
Forked from domadev812/1.js
Created November 15, 2017 21:06
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 stephenlb/3157a56e530ffe921e32f126a253932e to your computer and use it in GitHub Desktop.
Save stephenlb/3157a56e530ffe921e32f126a253932e to your computer and use it in GitHub Desktop.
Shyam Mongo DB Blog
var pubnub = new PubNub({
publishKey : 'demo',
subscribeKey : 'demo'
})
var updatePrice = function(msg) {
}
pubnub.subscribe({
channels: ['stockdata']
});
pubnub.addListener({
message: function (message) {
console.log(message)
}
})
var privateChannel = pubnub.uuids;
var updateChart = function(msg) {
}
pubnub.subscribe({
channels: updateChart
});
pubnub.addListener({
message: function (message) {
console.log(message)
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment