Skip to content

goodow/bower-realtime-channel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bower-realtime-channel

Install

Install with bower:

bower install realtime-channel#gh-pages

Add <script> tags to your index.html:

<script src="bower_components/paho-mqtt/src/mqttws31.js"></script>
<script src="bower_components/realtime-channel/realtime-channel.js"></script>

Usage

var bus = new realtime.channel.Bus("localhost", Number(1883));

bus.subscribe("some/topic", function(message) {
  var payload = message.payload;
  console.log("payload: " + JSON.stringify(payload, null, 2));
});

bus.publish("some/topic", {"name": "Larry Tin"});

See a full example for more usage.

You can try out the Goodow Realtime Channel API Playground on its live instance.

About

Bower package for the stable branch of realtime-channel

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published