This package has been deprecated

Author message:

This package is no longer maintained

rvi

0.0.6 • Public • Published

RVI Node.js Client NPM Version Build Status Coverage Status

Node.js websocket client for interacting with an RVI node.

Features

  • Register services with RVI node.
  • Invoke remote services.
  • Auto-reconnect to recover from broken connections or RVI node downtime.
  • Consume and handle errors gracefully.
  • Configurable to handle various use cases.
  • Built in logging with bunyan.

Getting Started

  • Install package:
npm install rvi
  • Connect to an RVI node, register, and call a service:
var RVI = require('rvi');
 
var rvi = new RVI('localhost:5000');
 
// Registers the service at the RVI node with given callback.
rvi.registerService('/unlock', function() {
 
  console.log('unlock called');
 
});
 
// The service must be prefixed with the node prefix set in the RVI config
rvi.callService('genivi.org/id/123/unlock');

API Reference

View full API reference and examples at: doc/rvi.md.

Development

To develop on the rvi node client, clone this repo. The following commands will be useful while developing:

Setup

Install all dependencies.

npm install

Testing and Coverage

Run unit tests. The tests use port 4000 to create a web socket server. Ensure nothing is running on that port when testing.

npm test

Run test coverage. For detailed line output, open coverage/lcov-report/index.html in a web browser.

npm run cover

Linting and Style

Uses JSHint to check for correctness.

npm run lint

Uses JSCS to enforce consistent code style.

npm run style

Documentation

Generate API reference from inline JSDoc, outputed at doc/rvi.md.

npm run doc

Readme

Keywords

Package Sidebar

Install

npm i rvi

Weekly Downloads

0

Version

0.0.6

License

MPL-2.0

Last publish

Collaborators

  • gurpreetatwal
  • sankethkatta
  • smartcar-ci
  • smartcarops