Bastly offers the hability to create realtime apps. You only need to write a frew lines in your app to enable synchronization across all your connected devices.
var bastly = bastly({
from: "alice",
apiKey: "testApikey",
callback: function (data){
console.log("got data in channel alice");
console.log(data);
}
});
});
//send data, any JSON object up to 20Kb aprox
bastly.send("bob", {likes:1});
//subscribe to new channel
bastly.subscribe("anotherChannel", function(data){
console.log("got data in channel anotherChannel");
console.log(data);
});
-
Download
$ wget http://www.bastly.com/releases/browser/bastly.js
or
$ bower install bastly --save
-
Place bastly script right before your
body
close tag -
Place your script below the bastly script
<script type="text/javascript" src="path/to/bastly/script"></script>
<script type="text/javascript">
// Your code goes here
</script>
- Donwload
$ npm install bastly