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");
});
-
Notifications
You must be signed in to change notification settings - Fork 6
connect middleware for server sent events (EventSource)
License
andrewrk/connect-sse
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
connect middleware for server sent events (EventSource)
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published