An open API service indexing awesome lists of open source software.

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.

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");
});
```