mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-06-28 00:11:34 +00:00
docs: update examples for latest libp2p rc (#353)
* docs: update chat example readme * docs: update discovery test for autodial * docs: fix delegated routing example * docs: update echo example readme * docs: fix libp2p in the browser example * docs: update examples for peer/content routing * docs: update the pubsub example
This commit is contained in:
@ -62,11 +62,8 @@ parallel([
|
||||
const node1 = nodes[0]
|
||||
const node2 = nodes[1]
|
||||
|
||||
series([
|
||||
(cb) => node1.once('peer:discovery', (peer) => node1.dial(peer, cb)),
|
||||
(cb) => setTimeout(cb, 500)
|
||||
], (err) => {
|
||||
if (err) { throw err }
|
||||
node1.once('peer:connect', (peer) => {
|
||||
console.log('connected to %s', peer.id.toB58String())
|
||||
|
||||
// Subscribe to the topic 'news'
|
||||
node1.pubsub.subscribe('news',
|
||||
|
Reference in New Issue
Block a user