Public
Edited
Jul 20, 2023
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
viewof peerId = Inputs.text({ label: "Enter ID of peer:", submit: "Connect" })
Insert cell
await new Promise((res) => {
myself.on("connection", (conn) => {
console.log(conn);
peerConnections[peerId] = conn;
res(`Connected to ${peerId}`);
});
if (peerId) {
const conn = myself.connect(peerId);
console.log(conn);
}
})
Insert cell
peerConnections = {
return {}
}
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more