Published
Edited
Sep 8, 2021
1 fork
18 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Phx = require('phoenix@1.5.0')
Insert cell
Insert cell
tempSocket = {
const socket = new Phx.Socket('wss://api.daybit.com/v1/socket');
socket.connect();
return socket;
}
Insert cell
tempChannel = new Promise((resolve, reject) => {
const channel = tempSocket.channel('/api');
channel.join().receive('ok', () => resolve(channel));
})
Insert cell
Insert cell
new Promise((resolve, reject) => {
tempChannel
.push('get_server_time', { timestamp: new Date() * 1000 })
.receive('ok', d => resolve(d.data))
.receive('error', d => reject(d.error_code));
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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