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

Commit 69f235f

Browse files
dirkmcAlan Shaw
authored and
Alan Shaw
committed
docs: fix ws port example, static refs in exchange files in browser (#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
1 parent f3116e9 commit 69f235f

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

exchange-files-in-browser/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ Since websockets support is currently not on by default, you'll need to add a We
8585
}
8686
```
8787

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

9090
```json
9191
"Addresses": {
9292
"Swarm": [
9393
"/ip4/0.0.0.0/tcp/4002",
94-
"/ip4/127.0.0.1/tcp/9999/ws"
94+
"/ip4/127.0.0.1/tcp/4003/ws"
9595
],
9696
"API": "/ip4/127.0.0.1/tcp/5002",
9797
"Gateway": "/ip4/127.0.0.1/tcp/9090"
@@ -111,9 +111,9 @@ You should see the Websocket address in the output:
111111
```sh
112112
Initializing daemon...
113113
Swarm listening on /ip4/127.0.0.1/tcp/4001
114-
Swarm listening on /ip4/127.0.0.1/tcp/9999/ws
114+
Swarm listening on /ip4/127.0.0.1/tcp/4003/ws
115115
Swarm listening on /ip4/192.168.10.38/tcp/4001
116-
Swarm listening on /ip4/192.168.10.38/tcp/9999/ws
116+
Swarm listening on /ip4/192.168.10.38/tcp/4003/ws
117117
API server listening on /ip4/127.0.0.1/tcp/5001
118118
Gateway (readonly) server listening on /ip4/0.0.0.0/tcp/8080
119119
Daemon is ready
@@ -165,7 +165,7 @@ Open another terminal window to find the websocket addresses that it is listenin
165165
> jsipfs id
166166
```
167167

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

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

17 KB
Loading

exchange-files-in-browser/public/app.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ let fileSize = 0
3131

3232
let node
3333
let info
34-
let Buffer
34+
let Buffer = IPFS.Buffer
3535

3636
/* ===========================================================================
3737
Start the IPFS node
@@ -53,8 +53,6 @@ function start () {
5353

5454
node = new IPFS(options)
5555

56-
Buffer = node.types.Buffer
57-
5856
node.once('start', () => {
5957
node.id()
6058
.then((id) => {

0 commit comments

Comments
 (0)