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

Commit

Permalink
docs: tutorial fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dryajov committed Mar 16, 2018
1 parent 89d0d6b commit e10fccc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 126 deletions.
121 changes: 2 additions & 119 deletions examples/circuit-relaying/.gitignore
Original file line number Diff line number Diff line change
@@ -1,119 +1,2 @@

# Created by https://www.gitignore.io/api/vim,macos,webstorm,visualstudiocode

### macOS ###
*.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Vim ###
# swap
.sw[a-p]
.*.sw[a-p]
# session
Session.vim
# temporary
.netrwhist
*~
# auto-generated tag files
tags

### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history
.cache

### WebStorm ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff:
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/dictionaries
.idea/

# Sensitive or high-churn files:
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.xml
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml

# Gradle:
.idea/**/gradle.xml
.idea/**/libraries

# CMake
cmake-build-debug/

# Mongo Explorer plugin:
.idea/**/mongoSettings.xml

## File-based project format:
*.iws

## Plugin-specific files:

# IntelliJ
/out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Ruby plugin and RubyMine
/.rakeTasks

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

### WebStorm Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721

# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr

# Sonarlint plugin
.idea/sonarlint


# End of https://www.gitignore.io/api/vim,macos,webstorm,visualstudiocode
node_modules/
.vscode/
14 changes: 7 additions & 7 deletions examples/circuit-relaying/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ This is what it looks like, in simplified steps:

That's it!

#### What's up with this `HOP` and `STOP` nonsense?
#### What's up with this `HOP` and `STOP`?

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:

Expand Down Expand Up @@ -332,12 +332,12 @@ const ipfs = new IPFS({
- 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

```js
ipfs.swarm.connect(peer, (err) => {
if (err) {
return console.error(err)
}
$pAddrs.innerHTML += `<li>${peer.trim()}</li>`
})
ipfs.swarm.connect(peer, (err) => {
if (err) {
return console.error(err)
}
$pAddrs.innerHTML += `<li>${peer.trim()}</li>`
})
```

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**!
Expand Down

0 comments on commit e10fccc

Please sign in to comment.