Skip to content

Instantly share code, notes, and snippets.

@toshtech
Created September 23, 2017 07:34
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 toshtech/39b87f58f2f29abc772646c8296ce5fa to your computer and use it in GitHub Desktop.
Save toshtech/39b87f58f2f29abc772646c8296ce5fa to your computer and use it in GitHub Desktop.
var PubNub = require('pubnub');
var pubnub = new PubNub({
subscribeKey: 'sub-c-52a9ab50-291b-11e5-baaa-0619f8945a4f'
});
pubnub.addListener({
message: function (message) {
for (var mes in message.message) {
var prtMes = "";
for(var m in message.message[mes]){
prtMes += " " + message.message[mes][m];
}
console.log(prtMes);
}
}
});
pubnub.subscribe({
channels: ['lightning_executions_FX_BTC_JPY']
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment