File tree 1 file changed +3
-1
lines changed
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.
17
17
The frontend is contained in ` index.html ` , ` index.js ` and ` index.css ` . It sets up the
18
18
DOM with a scrollable div at the top that is populated with new messages as they are broadcast.
19
19
At the bottom it adds a form to submit messages.
20
+
20
21
The 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.
22
24
23
25
The server portion is ` main.go ` and ` chat.go ` and implements serving the static frontend
24
26
assets, the ` /subscribe ` WebSocket endpoint and the HTTP POST ` /publish ` endpoint.
You can’t perform that action at this time.
0 commit comments