James Sherry PRO
Web Development Tutor and Co-Founder of { The Jump } Digital School
// Create WebSocket connection.
const socket = new WebSocket('ws://localhost:8080');
// Connection opened
socket.addEventListener('open', function (event) {
socket.send('Hello Server!');
});
// Listen for messages
socket.addEventListener('message', function (event) {
console.log('Message from server', event.data);
});
By James Sherry
Intro to D3.js; D3 wrappers, like NVD3.js, and; firebase (Google's socketed Database)