cursusdb-observer-node

1.0.4 • Public • Published

CursusDB Observer for Node.JS

About Node Observers

https://cursusdb.com/documentation#realtime-observers

npm

https://www.npmjs.com/package/cursusdb-observer-node

Example use

import Observer from 'cursusdb-observer-node'

let ob = new Observer("yoursharedkey")

if (ob.sharedKey !== undefined) {
    // To change default host
    //ob.ChangeHost("1.2.3.4")

    // To change default port
    //ob.ChangePort(1234)
    
    // To upgrade listener to TLS instead of TCP
    //ob.UpgradeToSecureListener()


    ob.Start() // Start listening

    ob.events.on('event', (data) => {
        console.log(data);

        // Handle websocket stuff here

        //..
    });
}

Readme

Keywords

none

Package Sidebar

Install

npm i cursusdb-observer-node

Weekly Downloads

7

Version

1.0.4

License

LGPL-3.0-only

Unpacked Size

39.4 kB

Total Files

4

Last publish

Collaborators

  • cursusdb