capturetechnologies / node-eventsource-http2

Nodejs EventSource implementation with http2 support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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
})

About

Nodejs EventSource implementation with http2 support

License:MIT License


Languages

Language:JavaScript 52.3%Language:TypeScript 47.7%