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:
Jacob Heun
2019-04-11 15:52:04 +02:00
committed by GitHub
parent aa1d9b273a
commit 4cb541ddae
16 changed files with 64 additions and 86 deletions

View File

@ -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',