diff --git a/examples/chat/README.md b/examples/chat/README.md index a4c99a93447f0c4eecacdd48b17a0f285c680de6..fc7df5d0a7a9256936b0d6852f0dc6f3706291a6 100644 --- a/examples/chat/README.md +++ b/examples/chat/README.md @@ -17,8 +17,10 @@ Visit the printed URL to submit and view broadcasted messages in a browser. The frontend is contained in `index.html`, `index.js` and `index.css`. It sets up the DOM with a scrollable div at the top that is populated with new messages as they are broadcast. At the bottom it adds a form to submit messages. + The messages are received via the WebSocket `/subscribe` endpoint and published via -the HTTP POST `/publish` endpoint. +the HTTP POST `/publish` endpoint. The reason for not publishing messages over the WebSocket +is so that you can easily publish a message with curl. The server portion is `main.go` and `chat.go` and implements serving the static frontend assets, the `/subscribe` WebSocket endpoint and the HTTP POST `/publish` endpoint.