Demonstrates setting up, using and tearing down a server-sent-events event stream. Events are sent from multiple threads.
- Start the application:
lein run
- Use
curl http://localhost:8080
to see event stream data. - Read the source code at src/server_sent_events/service.clj.
- Build the client application:
lein cljsbuild once
- Start the application:
lein run
- Open a browser to:
http://localhost:8080/index.html
and open the JavaScript Console - Read the source code at src/server_sent_events/client/main.cljs
To configure logging see config/logback.xml. By default, the app logs to stdout and logs/. To learn more about configuring Logback, read its documentation.