Skip to content

HQIT/spring-server-sent-event-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Spring boot SSE(Server-Sent Event) DEMO

Front end

  • HTML5 + Javascript codes generated by GPT-4
  • Connect to GET /events when page initialized
  • Two buttons(1 and 2), clicked to emit json message to POST /events, like { "text": "sendButton1" }
  • Receive Event (json formated) from SSE connection, like { "target": "sendButton1", "event": "clicked" }
  • Update the coutner of clicked times for current clicked button

Backend, server side(powered by Spring boot)

  • GET /events, SSE endpoint
  • POST /events, for web client emit message to backend
  • return/response immediately
  • later, here can trigger a BPMN workflow, then return/response immediately
  • after a workflow finished, emit the result to specialized SSE connection

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published