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

Commit f265445

Browse files
committed
docs: tutorial fixes
1 parent 9f51067 commit f265445

File tree

2 files changed

+9
-126
lines changed

2 files changed

+9
-126
lines changed

examples/circuit-relaying/.gitignore

+2-119
Original file line numberDiff line numberDiff line change
@@ -1,119 +1,2 @@
1-
2-
# Created by https://www.gitignore.io/api/vim,macos,webstorm,visualstudiocode
3-
4-
### macOS ###
5-
*.DS_Store
6-
.AppleDouble
7-
.LSOverride
8-
9-
# Icon must end with two \r
10-
Icon
11-
12-
# Thumbnails
13-
._*
14-
15-
# Files that might appear in the root of a volume
16-
.DocumentRevisions-V100
17-
.fseventsd
18-
.Spotlight-V100
19-
.TemporaryItems
20-
.Trashes
21-
.VolumeIcon.icns
22-
.com.apple.timemachine.donotpresent
23-
24-
# Directories potentially created on remote AFP share
25-
.AppleDB
26-
.AppleDesktop
27-
Network Trash Folder
28-
Temporary Items
29-
.apdisk
30-
31-
### Vim ###
32-
# swap
33-
.sw[a-p]
34-
.*.sw[a-p]
35-
# session
36-
Session.vim
37-
# temporary
38-
.netrwhist
39-
*~
40-
# auto-generated tag files
41-
tags
42-
43-
### VisualStudioCode ###
44-
.vscode/*
45-
!.vscode/settings.json
46-
!.vscode/tasks.json
47-
!.vscode/launch.json
48-
!.vscode/extensions.json
49-
.history
50-
.cache
51-
52-
### WebStorm ###
53-
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
54-
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
55-
56-
# User-specific stuff:
57-
.idea/**/workspace.xml
58-
.idea/**/tasks.xml
59-
.idea/dictionaries
60-
.idea/
61-
62-
# Sensitive or high-churn files:
63-
.idea/**/dataSources/
64-
.idea/**/dataSources.ids
65-
.idea/**/dataSources.xml
66-
.idea/**/dataSources.local.xml
67-
.idea/**/sqlDataSources.xml
68-
.idea/**/dynamic.xml
69-
.idea/**/uiDesigner.xml
70-
71-
# Gradle:
72-
.idea/**/gradle.xml
73-
.idea/**/libraries
74-
75-
# CMake
76-
cmake-build-debug/
77-
78-
# Mongo Explorer plugin:
79-
.idea/**/mongoSettings.xml
80-
81-
## File-based project format:
82-
*.iws
83-
84-
## Plugin-specific files:
85-
86-
# IntelliJ
87-
/out/
88-
89-
# mpeltonen/sbt-idea plugin
90-
.idea_modules/
91-
92-
# JIRA plugin
93-
atlassian-ide-plugin.xml
94-
95-
# Cursive Clojure plugin
96-
.idea/replstate.xml
97-
98-
# Ruby plugin and RubyMine
99-
/.rakeTasks
100-
101-
# Crashlytics plugin (for Android Studio and IntelliJ)
102-
com_crashlytics_export_strings.xml
103-
crashlytics.properties
104-
crashlytics-build.properties
105-
fabric.properties
106-
107-
### WebStorm Patch ###
108-
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
109-
110-
# *.iml
111-
# modules.xml
112-
# .idea/misc.xml
113-
# *.ipr
114-
115-
# Sonarlint plugin
116-
.idea/sonarlint
117-
118-
119-
# End of https://www.gitignore.io/api/vim,macos,webstorm,visualstudiocode
1+
node_modules/
2+
.vscode/

examples/circuit-relaying/README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ This is what it looks like, in simplified steps:
3939

4040
That's it!
4141

42-
#### What's up with this `HOP` and `STOP` nonsense?
42+
#### What's up with this `HOP` and `STOP`?
4343

4444
Circuit relay consists of two logical parts — dialer/listener and relay (`HOP`). The listener is also known as the `STOP` node. Each of these — dial, listen, and relay — happen on a different node. If we use the nodes from the above example, it looks something like this:
4545

@@ -332,12 +332,12 @@ const ipfs = new IPFS({
332332
- 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
335-
ipfs.swarm.connect(peer, (err) => {
336-
if (err) {
337-
return console.error(err)
338-
}
339-
$pAddrs.innerHTML += `<li>${peer.trim()}</li>`
340-
})
335+
ipfs.swarm.connect(peer, (err) => {
336+
if (err) {
337+
return console.error(err)
338+
}
339+
$pAddrs.innerHTML += `<li>${peer.trim()}</li>`
340+
})
341341
```
342342

343343
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**!

0 commit comments

Comments
 (0)