Skip to content

Instantly share code, notes, and snippets.

View mateusduraes's full-sized avatar
🏠
Working from home

Mateus Duraes mateusduraes

🏠
Working from home
View GitHub Profile
@fdaciuk
fdaciuk / Live Node.js + TS com Programação Funcional.md
Last active January 29, 2025 18:17
Live Node.js + TS com Programação Funcional
@crtr0
crtr0 / client.js
Created June 8, 2012 17:02
A simple example of setting-up dynamic "rooms" for socket.io clients to join
// set-up a connection between the client and the server
var socket = io.connect();
// let's assume that the client page, once rendered, knows what room it wants to join
var room = "abc123";
socket.on('connect', function() {
// Connected, let's sign-up for to receive messages for this room
socket.emit('room', room);
});