Skip to content

Instantly share code, notes, and snippets.

@joshmarinacci
Forked from pblca/Occupancy.js
Last active March 23, 2017 20:39
Show Gist options
  • Save joshmarinacci/53719c9aed6e6261d7a34014b2a87978 to your computer and use it in GitHub Desktop.
Save joshmarinacci/53719c9aed6e6261d7a34014b2a87978 to your computer and use it in GitHub Desktop.
pubnub.subscribe({channels: [channel]});
pubnub.addListener({
presence: function(m){
document.getElementById('occupancy').textContent = m.occupancy;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment