Miss any of our Open RFC calls?Watch the recordings here! »

connect-sse

1.2.0 • Public • Published

Build Status

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

Install

npm i connect-sse

DownloadsWeekly Downloads

1,218

Version

1.2.0

License

MIT

Last publish

Collaborators

  • avatar