+26
README.org
+26
README.org
···
1
+
* SSE server in Golang
2
+
3
+
This is just a POC of a SSE server containing two endpoints, 1 for subscribing and 1 for publishing messages.
4
+
5
+
6
+
** How to run
7
+
8
+
You can use =just= to run the server locally
9
+
10
+
#+begin_src shell
11
+
just run
12
+
#+end_src
13
+
14
+
** How to use
15
+
16
+
After running the server, you can subscribe using =curl= with the following command
17
+
18
+
#+begin_src shell
19
+
curl localhost:8000/subscribe
20
+
#+end_src
21
+
22
+
Later, you can simply publish a message in the =/publish= endpoint with the following command
23
+
24
+
#+begin_src shell
25
+
curl localhsot:8000/publish -d '{"name": "Tulkdan", "value": 2000 }'
26
+
#+end_src