$ go run *.go
telnet localhost 3333
curl -d 'username=myFancyUserName&msg=How do you do fellow kids?' 'http://localhost:3000/post'
curl 'http://localhost:3000/messages'
There aren't any bugs I'm aware of. There is currently only 1 big chatroom. I'm using channels to broadcast messages between all the connected clients. After you connect via telnet you can type /help
to se what commands are available.
All chat messages are saved to ./messages.log
.
Given more time, I would add tests, add proper error conditions, and ensure I'm closing the channels and connections properly. Following that, I'd start testing scale, and see how the server scales before optimizing.