connect-redis-sse

    0.1.1 • Public • Published

    Connect.js Server-Sent Events with Redis

    Connect/Express middleware for publishing Server-Sent Events (EventSource) using Redis pub/sub.

    Usage

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

    Keywords

    none

    Install

    npm i connect-redis-sse

    DownloadsWeekly Downloads

    0

    Version

    0.1.1

    License

    MIT

    Last publish

    Collaborators

    • loopj