Published unlisted
Edited
Apr 22, 2020
1 star
Insert cell
Insert cell
Insert cell
message = Generators.queue(notify => {
const socket = new WebSocket(`wss://fathomless-inlet-57663.herokuapp.com/${username}`);
socket.onerror = () => notify(Promise.reject(new Error("socket error")));
socket.onclose = () => notify(Promise.reject(new Error("socket closed")));
socket.onmessage = event => notify(JSON.parse(event.data));
return () => socket.close();
});
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