Skip to content
connect middleware for server sent events (EventSource)
Find file
Latest commit a5aa1bc May 8, 2015 @andrewrk Release 1.2.0

Build Status


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");
Something went wrong with that request. Please try again.