This repository is a proof of concept to try the server sent events HTTP standard. It consits in the following parts:
- BackEnd
- Endpoint to subscribe to the messages ServerSendEventController
- Endpoint to trigger an Spring Event that will call the emitter RegisterEventController
- Endpoint that renders a simple page with some js FEController
- Frontend
- Simplest html file as possible
- JS to handle the server sent events eventListener.js
mvn clean install
mvn spring-boot:run
Go to localhost:3099
Click on the button Connect, a call to /emitter would be done. After click on RegisterEvent and a GET call without response content to /register-event will be done. Notice how the output is being updated without any petition from the FE.