Server Sent Event Implementation in Spring Boot and ReactJs
To run React app, go to "sse-reactjs-client" folder and run commands:
- npm i
- npm start React app will run on default port: 3000
Make sure to create ".env" file from ".env.sample" and set the Server Url.
To run Spring boot application, go to "sse-springboot-server" folder and run commands:
- ./gradle build (linux/mac) or gradlew.bat build (windows)
- ./gradle bootRun (linux/mac) or gradlew.bat bootRun (windows) Spring Boot application will run on default port: 8080
Check out the story to know few more things: