GitHub - hantsy/angular-spring-sse-sample: Demo for using Angular and Spring WebFlux Server Sent Events together

This sample is to demonstrate a chat application using the following cutting-edge technology stack :

  • Angular as client
  • Spring WebFlux based Server Sent Event to broadcast messages to clients
  • Spring Data MongoDB based @Tailable query result as an infinite stream

Prerequisites

  • NodeJS 14
  • OpenJDK 14
  • Docker for Windows/MacOS

Build

Before running the application, you should build and run client and server side respectively.

Server

Run a MongoDB service firstly, simply you can run it from a Docker container. There is a docker-compose.yaml file is ready for you.

docker-compose up mongodb

Build the application.

Run the target jar from the build folder to start up the application.

Client

Install dependencies.

Start up the application.

Open a browser and navigate to http://localhost:4200.