Websockets Journey
I'm making starters as I make my way through a @fastify/websocket and Websockets API journey
5 Projects
This is my first starter, it simply has the client and server send a message to each other. The server broadcasts to all clients how many of them are there whenever anyone joins or leaves.
This is the second starter I made, a remix of ~hello-fastify-websocket. Instead of broadcasting the number of clients, the server instead keeps an object tracking each unique client and what emoji and cursor position they are at. With this object received by a client, it can then render the presence of all the clients actively on the page.