0.0.4 • Published 6 years ago

@embedded-enterprises/service v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

Service Library

Introduction

This is a service library implementation for Interconnect from Embedded Enterprises. This is a reimplementation from service library.

Usage

const Service = require('../src/service');

const serviceConfiguration = {
    realm: 'slimerp',
    url: 'ws://localhost:8001',
    user: 'root',
    password: 'root',
    useAuth: true
};

const service = new Service(serviceConfiguration);

service.connect();

service.registerAll([
    {
        name: 'com.service.test',
        handler: (args, kwagrs, details) => {

            // Do Magic

            return {
                ...
            }
        },
        options: {
            // Options from https://github.com/crossbario/autobahn-js/blob/master/doc/reference.md#subscribe
        }
    }
]);

service.subscribeAll([
    {
        name: 'com.otherservice.test',
        handler: (args, kwagrs, details) => {

            // Do Magic

            return {
                ...
            }
        },
        options: {
            // Options from https://github.com/crossbario/autobahn-js/blob/master/doc/reference.md#subscribe
        }
    }
]);

Feature List

FeatureImplemented
Ticket AuthYes
TLS Client AuthNo
WSSNo