Links

Larry Documentation

Quick Documentation for App/Service Modules

App Configuration

1. Require app connection library

let appSocket = require('./app-Connection-Library');
2. App socket configuration (must be declared after the appSocket)
appSocket.configure(Name_of_app, version, services_needed, config);
Name_of_app
version
services_needed
config
Name_of_app is a string
version is a numerical value
services_needed is an array of strings ['service1', 'service2' ...]
config is user defined and may be an array, object, or a single string/numerical value

3. Send Message to Service

appSocket.send('Service name', JSON.stringify({type:'myData', data:msg.data}));

Service Configuration

1. Require app connection library

let serviceSocket = require('./services-Connection-Library');
2. App socket configuration (must be declared after the serviceSocket)
serviceSocket.configure(Name_of_service, version, service_capabilities, destination);
Name_of_service
version
service_capabilities
destination
Name_of_service is a string
version is a numerical value
String TBD
TBD

3. Send Message to App

serviceSocket.send('App name', JSON.stringify({type:'myData', data:msg.data}));