@asaje/sse-push-event-client
v1.0.6
Published
## **Description**
Downloads
4
Readme
SSE-PUSH-EVENT
Description
Lightweight package for SSE push events handling
Installation
npm i @asaje/sse-push-event-client
or
yarn add @asaje/sse-push-event-client
How to use
import {
initPushEvent,
joinPushEventRoom,
addPushEventListener,
} from '@asaje/sse-push-event-client';
initPushEvent('http://localhost:3000/events');
joinPushEventRoom('test');
addPushEventListener('TEST', (data) => {
console.log('Received: ', data);
});