You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
chore: update example with public webrtc servers (#3126)
Per #2779 , this PR adds the public webrtc servers to the browser example.
This allows users to run easily the example, but also provides information for how users should use a signaling server for production.
Now every file that you upload in one tab will appear in the other! You can even open a new tab in that workspace and it will sync the files that were added before!
236
218
237
219

220
+
221
+
## Going to production?
222
+
223
+
This example uses public webrtc-star servers. These servers should be used for experimenting and demos, they **MUST** not be used in production as there is no guarantee on availability.
224
+
225
+
### Use your own `libp2p-webrtc-star` signaling server
226
+
227
+
This server allows the two browser nodes to talk to each other by doing the initial handshake and network introductions.
228
+
229
+
First install the `libp2p-webrtc-star` module globally:
230
+
231
+
```sh
232
+
> npm install -g libp2p-webrtc-star
233
+
```
234
+
235
+
This will give you the `webrtc-star` command. Use this to start a signaling server:
236
+
237
+
```sh
238
+
> webrtc-star
239
+
```
240
+
241
+
By default it will listen to all incoming connections on port 13579. Override this with the `--host` and/or `--port` options. That is, the following multiaddr: `/ip4/127.0.0.1/tcp/13579/wss/p2p-webrtc-star`.
242
+
243
+
You should add your signaling server in the IPFS config swarm addresses, so that you listen for new connections through it.
0 commit comments