Package Exports
- express-sse
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (express-sse) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
#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(["array", "containing", "initial", "content", "(optional)"]);
...
app.get('/stream', sse.init);
...
sse.send(content);
sse.updateInit(["array", "containing", "new", "initial", "content"]);###Client:
var es = new EventSource('/stream');
es.onmessage = function (event) {
...
};