I’m trying to connect a browser libp2p node over to a go libp2p node. I’m using the following config in the browser: https://gist.github.com/tobowers/f1a2ba018f54199a1ab990a293093bdd
I use the following cljs code to initialize the node:
(p2p/CreateNode (fn [err node] (println "done creating " err node) (.on node "peer:discovery" (fn [peer-info] (.log js/console "discovered a peer id: " (.-id peer-info)))) (.on node "connection:start", (fn [peer] (.log js/console "connecting", peer))) (.on node "peer:connect" (fn [peer] (.log js/console "peer connected" peer))) (.on node "error" (fn [err] (.log js/console "error" err))) (.start node (fn [err] (println "started node"))))))
I see in the browser that the web socket connects and a message is sent but the browser logs that a connection is starting and that a peer has been discovered but never logs the connect, nor an error.
What’s the best way to have a browser node bootstrap to a go node?