Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

arangoreal

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arangoreal

`arangoreal` pushs ArangoDB changes in realtime to you

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

arangochair

arangochair pushs ArangoDB changes in realtime to you.

install

npm install --save arangochair

quick example

const arangochair = require('arangochair');

const no4 = new arangochair('http://127.0.0.1:8529/'); // ArangoDB node to monitor

const no4 = new arangochair('http://127.0.0.1:8529/myDb'); // ArangoDB node to monitor, with database name

const no4 = new arangochair('http://user:password@127.0.0.1:8529/myDb'); // ArangoDB node to monitor, with database name, with auth

const no4 = new arangochair({
  protocol: 'http',
  auth: 'user:password',
  hostname: 'localhost',
  port: 8529,
  path: '/myDb'
}); // ArangoDB node to monitor, with database name, with auth (`url.parse` and `url.format` properties)

no4.subscribe({collection:'users'});
no4.start();
no4.on('users', (doc, type) => {
    // do something awesome

    // doc:Buffer
    // type:'insert/update'|'delete'
});

no4.on('error', (err, httpStatus, headers, body) => {
    // arangochair stops on errors
    // check last http request
    no4.start();
});

subscribe

// subscribe to all events in the users collection
no4.subscribe('users');

// explicit
no4.subscribe({collection:'users', events:['insert/update', 'delete']});


// subscribe the users collection with only the delete event
no4.subscribe({collection:'users', events:['delete']});

// subscribe the users collection with only the delete event on key myKey
no4.subscribe({collection:'users', events:['delete'], keys:['myKey']});

unsubscribe

// unsubscribe the users collection
no4.unsubscribe('users');

// unsubscribe the delete event in the users collection
no4.unsubscribe({collection:'users',events:['delete']});

// unsubscribe the key myKey in the users collection
no4.unsubscribe({collection:'users',keys:['myKey']});

Keywords

FAQs

Package last updated on 13 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc