Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 516 Bytes

README.md

File metadata and controls

24 lines (18 loc) · 516 Bytes

node-eventsource-http2

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-http2

usage

Spec

const EventSource = require('node-eventsource')
const sse = new EventSource('your.endpoint/sse');
sse.addEventListener('type', (event) => {
  // your code goes here
})