Nono.MA

MARCH 31, 2023

Here's how to connect and communicate with WebSocket servers from browser client applications using the WebSocket API and the WebSocket protocol.

// Create a WebSocket client in the browser.
const ws = new WebSocket("ws://localhost:1234");

// Log incoming messages to the console.
ws.onmessage = function (event) {
  // This runs when receiving message.
  console.log(event.data);
};

ws.onopen = () => {
  // This runs when we connect.
  // Submit a message to the server
  ws.send(`Hello, WebSocket! Sent from a browser client.`);
};

AUGUST 8, 2022


How to build a client for real-time communication with WebSockets in TypeScript using the ws NPM package.


See transcript ›

AUGUST 1, 2022


How to build a server for real-time communication with WebSockets in TypeScript using the ws NPM package.


See transcript ›

JULY 25, 2022


WebSocket server and client in TypeScript & Node.js with the ws NPM package.


See transcript ›

JULY 18, 2022


How to download Elgato Stream Deck's software, assign actions to keys & the Store.


See transcript ›

Want to see older publications? Visit the archive.

Listen to Getting Simple .