Skip to content

Instantly share code, notes, and snippets.

@yrong
Forked from chrismatthieu/ipfspub.js
Created February 26, 2018 09:17
Show Gist options
  • Save yrong/cb6a0ace805079af221d2df703c2b3a9 to your computer and use it in GitHub Desktop.
Save yrong/cb6a0ace805079af221d2df703c2b3a9 to your computer and use it in GitHub Desktop.
var msgSend;
var counter = 0
setInterval(function(){
msgSend = new Buffer(counter.toString());
ipfs.pubsub.publish(topic, msgSend, (err) => {
if (err) {
throw err
}
// msg was broadcasted
})
counter++
}, 3000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment