@roblabla/connect-sse
v1.3.0
Published
connect middleware for server sent events (EventSource)
Downloads
3
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");
});