this repo has no description
1* SSE server in Golang
2
3This 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
8You can use =just= to run the server locally
9
10#+begin_src shell
11just run
12#+end_src
13
14** How to use
15
16After running the server, you can subscribe using =curl= with the following command
17
18#+begin_src shell
19curl "localhost:8000/subscribe?topic=notification"
20#+end_src
21
22Later, you can simply publish a message in the =/publish= endpoint with the following command
23
24#+begin_src shell
25curl "localhsot:8000/publish?topic=notification" -d '{"name": "Tulkdan", "value": 2000 }'
26#+end_src