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

Commit 0258759

Browse files
AquiGorkadaviddias
authored andcommittedNov 22, 2017
docs: add to FAQ a custom signaling server description (#1104)
License: MIT Signed-off-by: Jorge Ludlow <gorka@aquigorka.com>
1 parent 71faa92 commit 0258759

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
 

‎README.md

+26
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,32 @@ Yes, unfortunately, due to [Chrome aggressive resource throttling policy](https:
377377

378378
A way to mitigate this in Chrome, is to run your IPFS node inside a Service Worker, so that the IPFS instance runs in a background process. You can learn how to install an IPFS node as a service worker in here the repo [ipfs-service-worker](https://github.com/ipfs/ipfs-service-worker)
379379

380+
#### How can I configure an IPFS node to use a custom `signaling server`?
381+
382+
You'll need to execute a compatible `signaling server` ([libp2p-webrtc-star](https://github.com/libp2p/js-libp2p-webrtc-star) works) and to setup the correct configurations params for your IPFS node:
383+
384+
- enable `pubsub`
385+
- provide the [`multiaddr`](https://github.com/multiformats/multiaddr) for the `signaling server`
386+
387+
388+
```JavaScript
389+
const node = new IPFS({
390+
repo: 'your-repo-path',
391+
EXPERIMENTAL: {
392+
pubsub: true,
393+
},
394+
config: {
395+
Addresses: {
396+
Swarm: [
397+
'/ip4/127.0.0.1/tcp/9090/ws/p2p-webrtc-star'
398+
]
399+
}
400+
}
401+
})
402+
```
403+
404+
The code above assumes you are running a local `signaling server` on port `9090`. Provide the correct values accordingly.
405+
380406
## Packages
381407

382408
| Package | Version | Deps | DevDeps | Build |

0 commit comments

Comments
 (0)
This repository has been archived.