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

Commit

Permalink
docs: fix ws port example, static refs in exchange files in browser (#…
Browse files Browse the repository at this point in the history
…1968)

* chore: fix ws port in exchange files in browser README

* fix: exchange files in browser example - use static type

* fix: exchange files in browser - update ws port

* chore: exchange files in browser - update screenshot
  • Loading branch information
dirkmc authored and Alan Shaw committed Mar 30, 2019
1 parent 3654e50 commit af02d76
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
10 changes: 5 additions & 5 deletions examples/exchange-files-in-browser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ Since websockets support is currently not on by default, you'll need to add a We
}
```

Add the `/ip4/127.0.0.1/tcp/9999/ws` entry to your `Swarm` array. Now it should look like this:
Add the `/ip4/127.0.0.1/tcp/4003/ws` entry to your `Swarm` array. Now it should look like this:

```json
"Addresses": {
"Swarm": [
"/ip4/0.0.0.0/tcp/4002",
"/ip4/127.0.0.1/tcp/9999/ws"
"/ip4/127.0.0.1/tcp/4003/ws"
],
"API": "/ip4/127.0.0.1/tcp/5002",
"Gateway": "/ip4/127.0.0.1/tcp/9090"
Expand All @@ -111,9 +111,9 @@ You should see the Websocket address in the output:
```sh
Initializing daemon...
Swarm listening on /ip4/127.0.0.1/tcp/4001
Swarm listening on /ip4/127.0.0.1/tcp/9999/ws
Swarm listening on /ip4/127.0.0.1/tcp/4003/ws
Swarm listening on /ip4/192.168.10.38/tcp/4001
Swarm listening on /ip4/192.168.10.38/tcp/9999/ws
Swarm listening on /ip4/192.168.10.38/tcp/4003/ws
API server listening on /ip4/127.0.0.1/tcp/5001
Gateway (readonly) server listening on /ip4/0.0.0.0/tcp/8080
Daemon is ready
Expand Down Expand Up @@ -165,7 +165,7 @@ Open another terminal window to find the websocket addresses that it is listenin
> jsipfs id
```

It should look like this: `/ip4/127.0.0.1/tcp/9999/ws/ipfs/<your_peer_id>`.
It should look like this: `/ip4/127.0.0.1/tcp/4003/ws/ipfs/<your_peer_id>`.

Copy and paste the *multiaddr* to connect to that peer:

Expand Down
Binary file modified examples/exchange-files-in-browser/img/connect-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions examples/exchange-files-in-browser/public/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ let fileSize = 0

let node
let info
let Buffer
let Buffer = IPFS.Buffer

/* ===========================================================================
Start the IPFS node
Expand All @@ -53,8 +53,6 @@ function start () {

node = new IPFS(options)

Buffer = node.types.Buffer

node.once('start', () => {
node.id()
.then((id) => {
Expand Down

0 comments on commit af02d76

Please sign in to comment.