This project demonstrates various real-time data streaming approaches using Node.js + Express.js. It includes examples for:
- 🎥 Video Streaming with file piping.
- 📊 Large JSON Streaming using chunked transfer encoding.
- ⚡ Server-Sent Events (SSE) for one-way communication to the client.
- 💬 WebSockets for two-way real-time communication.
- Node.js
- Express.js
- WebSocket (for WebSocket example)
git clone https://github.com/gaju91/streaming-server.git
cd streaming-server
npm install
node server.js🎬 /video –– Detailed Instructions
Efficient video delivery using HTTP range requests.
http://localhost:3000/video
📦 /chunked –– Detailed Instructions
Simulates large file downloads using chunked transfer encoding.
http://localhost:3000/chunked
---
🔄 /events – Detailed Instructions
Receive real-time one-way updates pushed from the server.
test using file given in folder running on local server
💬 /ws – Detailed Instructions
Use a WebSocket client to connect and test two-way communication.
test using file given in folder running on local server