@kameleoon/nodejs-event-source
v1.1.0
Published
Kameleoon NodeJS SDK EventSource
Downloads
10,215
Readme
Kameleoon NodeJS SDK Event Source
Introduction
Kameleoon NodeJS SDK Event Source is a small helper package which provides default implementation for Kameleoon NodeJS SDK external Event Source built on top of NodeJS eventsource
library.
For more information refer to Official Kameleoon Documentation
Contents
Installation
- npm -
npm install @kameleoon/nodejs-event-source
- yarn -
yarn add @kameleoon/nodejs-event-source
- pnpm -
pnpm add @kameleoon/nodejs-event-source
- bun -
bun install @kameleoon/nodejs-event-source
Configuration
While using @kameleoon/nodejs-sdk
:
- Import
KameleoonEventSource
- Instantiate and pass it to external SDK dependencies
import { KameleoonClient } from '@kameleoon/nodejs-sdk';
import { KameleoonEventSource } from '@kameleoon/nodejs-event-source';
const client = new KameleoonClient({
siteCode: 'my_site_code',
credentials: {
clientId: 'my_id',
clientSecret: 'my_secret',
},
externals: {
eventSource: new KameleoonEventSource(),
},
});