The project illustrates a use case of the websocket (ws) protocol.
- The client app sends empty request to the server.
- Upon successful handshake, the server pushes current UTC timestamp formated as the ISO string. It's done perpetually with the delay of 200 ms. between two consecutive responses.
- Client app tails and displays 20 most recent responses.
sequenceDiagram
participant web as Web Browser
participant http as "/" endpoint
participant ws as "/ws" endpoint
web->>+http: Initial call
http->>-web: Returns HTML page with embedded JS
web->>+ws: Sends empty message
ws->>-web: Returns current timestamp every 200 ms.
- Run to see available commands:
make help
- Run to start the server:
make start
- Run to stop the server and clean the environment:
make stop