Closed alvesjtiago closed 6 years ago
Hello! Unfortuantely, discovery swarm does not work in the browser because you cannot make tcp/udp connections directly in browsers. You have to either use an http gateway, websockets, or webrtc-swarm.
Thank you @joehand.
Hi, thank you for your work on hypercore, hyperdb and discovery-swarm @mafintosh. I've been trying to setup hyperdb with discovery-swarm on the browser but it seems that with the default settings (tcp enabled) it fails on
net.createServer
. With utp enabled and tcp disabled it successfully creates the swarm but when callingjoin
it throwsCannot read property 'on' of null
because theserver
(tcp or udp) is null.Example code for each situation:
1.
2.
Is there any way to get discovery-swarm working on the browser? Thank you