File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,10 @@ Visit the printed URL to submit and view broadcasted messages in a browser.
1717The frontend is contained in ` index.html ` , ` index.js ` and ` index.css ` . It sets up the
1818DOM with a scrollable div at the top that is populated with new messages as they are broadcast.
1919At the bottom it adds a form to submit messages.
20+
2021The messages are received via the WebSocket ` /subscribe ` endpoint and published via
21- the HTTP POST ` /publish ` endpoint.
22+ the HTTP POST ` /publish ` endpoint. The reason for not publishing messages over the WebSocket
23+ is so that you can easily publish a message with curl.
2224
2325The server portion is ` main.go ` and ` chat.go ` and implements serving the static frontend
2426assets, the ` /subscribe ` WebSocket endpoint and the HTTP POST ` /publish ` endpoint.
You can’t perform that action at this time.
0 commit comments