Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

express-sse

0.1.0 • Public • Published

event-stream

An Express middleware for quick'n'easy server-sent events.

Installation:

npm install express-sse

Usage example:

Server:

var SSE = require('express-sse');
var sse = new SSE();

...

app.get('/stream', sse.init);

...

sse.send(content);

Client:

var es = new EventSource('/stream');

es.onmessage = function (event) {
  ...
};

install

npm i express-sse

Downloadsweekly downloads

628

version

0.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability