https://github.com/loopj/connect-redis-sse
Connect/Express middleware for publishing Server-Sent Events (EventSource) using Redis pub/sub.
https://github.com/loopj/connect-redis-sse
Last synced: 15 days ago
JSON representation
Connect/Express middleware for publishing Server-Sent Events (EventSource) using Redis pub/sub.
- Host: GitHub
- URL: https://github.com/loopj/connect-redis-sse
- Owner: loopj
- Created: 2012-10-28T22:10:49.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2012-10-29T00:31:28.000Z (over 13 years ago)
- Last Synced: 2026-04-20T16:13:03.106Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 105 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Connect.js Server-Sent Events with Redis
========================================
Connect/Express middleware for publishing
[Server-Sent Events](http://en.wikipedia.org/wiki/Server-sent_events)
(EventSource) using Redis pub/sub.
Usage
-----
```javascript
// Attach the middleware
connectRedisSse = require("connect-redis-sse");
app.use(connectRedisSse({redis: yourRedisClient}));
// Set up a subscription to a channel in your route
app.get("/subscribe-me", function (req, res) {
res.subscribe("channelName");
});
```