Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 0ff92af

Browse files
committed
docs: more improvements and typos
1 parent 3c92210 commit 0ff92af

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/circuit-relaying/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ The bundled example is a simple chat app that uses another cool ipfs feature - [
270270

271271
### 3. Connect the two browser nodes to the circuit relay
272272

273-
In order for our browser nodes to be able to messages each other, we need to get them connected. But do do that, we need to use a relay - browser nodes can't be connected directly because of lack of socket support.
273+
In order for our browser nodes to be able to messages each other, we need to get them connected. But to do that, we need to use a relay - browser nodes can't be connected directly because of lack of socket support.
274274

275275
Remember the caveat above `Currently a Relay will only work if it already has a connection to the STOP node`? This means that we need to connect our browser nodes to the relay node first.
276276

@@ -286,7 +286,7 @@ Let's repeat the same steps with the second tab. Now, both of our browser nodes
286286

287287
### 4. Dial the two browser nodes using a `/p2p-circuit` address
288288

289-
Now that both browsers are running side by side (as shown in the first screenshot), let's get them connected to each other. Head out to the `Addresses` box in one of the tabs, copy the `/p2p-circuit` address and then paste it into the `Connect to Peer` box in the other tab. Repeat these steps on the second tab.
289+
Now that our browsers are both connected to the relay peer, let's get them connected to each other. Head out to the `Addresses` box in one of the tabs, copy the `/p2p-circuit` address and then paste it into the `Connect to Peer` box in the other tab. Repeat these steps on the second tab.
290290

291291
![](./img/img5.png)
292292

@@ -329,7 +329,7 @@ const ipfs = new IPFS({
329329

330330
- We connected the browser nodes to an external node over its websocket transport using the `/ip4/127.0.0.1/tcp/4003/ws/ipfs/...` multiaddr. That external node happens to be a `HOP` node, meaning that it can relay connections for our browsers (and other nodes) allowing them to connect
331331

332-
- And finally we connected the two browser nodes using the `/p2p-circuit/ipfs/...` multiaddr. Take a look at the code below in [src/app.js](src/app.js), lines 102-107
332+
- And finally we connected the two browser nodes using the `/p2p-circuit/ipfs/...` multiaddr. Take a look at the code below in [src/app.js](src/app.js#L102...L107) - lines 102-107
333333

334334
```js
335335
ipfs.swarm.connect(peer, (err) => {
@@ -340,7 +340,7 @@ const ipfs = new IPFS({
340340
})
341341
```
342342

343-
Notice how there wasn't anything special we had to do to use the circuit once we had everything connected, all the magic is in the multiaddr! Multiaddrs are **AWESOME**!
343+
The above code snippet, handles connecting to other nodes using `ipfs.swarm.connect`, notice how there wasn't anything special we had to do to use the circuit once we had everything connected, all the magic is in the multiaddr! [Multiaddrs](https://multiformats.io/multiaddr/) are **AWESOME**!
344344

345345
I encourage the reader to take a look at the bundled app code to see how the browser nodes get setup, suffice to say nothing changes from the perspective of using an `IPFS` node in js code, apart from the new `EXPERIMENTAL` options.
346346

0 commit comments

Comments
 (0)