connect-sse
v1.2.0
Published
connect middleware for server sent events (EventSource)
Downloads
4,388
Maintainers
Readme
Usage:
var sse = require('connect-sse')();
var express = require('express')
var app = express()
app.get('/events', sse, function (req, res) {
res.json("this is an event");
res.json({here: "is", another: "event"});
res.json({here: "is a named event", to: "listen with addEventListener('example', function(){})"}, "example");
});