socketio/socket.io ? reverse-engineered prompt

Reverse engineered prompt

Build me a simple realtime communication library and demo that lets a server and a client send messages back and forth instantly. I want it to feel reliable and easy to use, so a developer can connect, send events, listen for events, and keep things working even when the connection changes.

Please include a small working example showing a chat style setup, plus basic documentation so someone can understand how to start the server, connect from the browser, and exchange messages. Make it work across common platforms, keep the experience low latency, and make the API feel friendly and straightforward.

If you need to check the latest docs or best practices online, go ahead and do that.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab