-
Notifications
You must be signed in to change notification settings - Fork 1.2k
how to use websockets transport in ipfs? #729
Comments
In a browser node, you don't have to add a WebSockets addr in order to be able to dial to a node with WebSockets. In a Node.js node, you need to add that to your config, see: https://github.com/ipfs/js-ipfs/blob/master/test/utils/temp-node.js#L11-L28 Or simply open the ~/.jsipfs/config file and add it directly. It looks the same as a |
@diasdavid Thanks, will try this as soon as I get all the issues with running inside a WW ironed out. |
Thank you @dryajov. Also, would you like to help us with documenting this details? |
Sure! Let me know how you'd like to do that. My current plan to move forward with #725 is to replace But if you referring merely to document this use case in particular, let me know where that should be done. Regardless, I'm here to help as much as I can :) |
woa, thank you! glad to have you around! I feel that the best way for now (until all of this primitives are common language to everyone) is that we have a mention on the README under the USAGE section, probably IPFS Core - https://github.com/ipfs/js-ipfs#ipfs-core-examples-use-ipfs-as-a-module and then a quick example of how that is achieve in the examples folder. |
I believe this is now answered, let me know if this is not the case. Also, with the new init setup, it is 100x simpler to add that websockets addr: Note: today, by default, js-ipfs ships with a websockets multiaddr, so you don't even have to add one :) |
Since WebRTC is no available in Web/Service Workers (w3c/webrtc-pc#230), for now the only other option is to use WebSockets. I haven't been able to find the correct multiaddress format/string to connect to IPFS node over WS and I'm probably missing a bunch of other things. Can someone provide an example/steps of how to connect to IPFS over WS?
This is part of the #127 effort as well as overall support of Web/Service Workers #725
The text was updated successfully, but these errors were encountered: