1.0.0 • Published 5 years ago
node-eventsource-http2 v1.0.0
node-eventsource
why
Eventsource nodejs client https://github.com/EventSource/eventsource doesn't support http/2.
This package fixes it build on top of http2
, so it fully supports it
install
npm install node-eventsource
usage
const EventSource = require('node-eventsource')
const sse = new EventSource('your.endpoint/sse');
sse.addEventListener('type', (event) => {
// your code goes here
})
1.0.0
5 years ago