8000 GitHub - cun3yt/server-sent-events: Demo Application of Server-Sent Events
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

cun3yt/server-sent-events

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Real-Time Data Visualization with SSE and D3.js

A minimal demonstration of Server-Sent Events (SSE) using TypeScript, Express.js, and D3.js. This project showcases real-time data streaming from a server to a web client, visualized through a beautiful, animated line graph.

Features

  • Server-Sent Events (SSE) implementation in TypeScript
  • Real-time data visualization using D3.js
  • Express.js backend with CORS support
  • Random data generation at 1-second intervals
  • Smooth animations and transitions

Getting Started

  1. Install dependencies:

    pnpm install
  2. Start the SSE server:

    pnpm start
  3. Start the file server:

    pnpm file-server
  4. Open http://localhost:8000 in your browser to see the visualization.

How It Works

The server generates random data points every second and broadcasts them to all connected clients using SSE. The client-side JavaScript uses D3.js to create a dynamic line graph that updates in real-time as new data arrives.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Demo Application of Server-Sent Events

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0