The SDK can target either HTTP or MQTT protocols(*), although MQTT (the default) is the preferred mode of operation.
MQTT is used for Node.js programs.
*: when "HTTP" is used, it means "HTTPS" and when "MQTT" is used, it means "MQTT-S" throughout this document.
npm install netrunr-gapi
To use the SDK, add the following to Node.js programs:
var appc = require("netrunr-gapi");
git clone https://github.com/axiomware/netrunr-gapi-js cd netrunr-gapi-js npm install cd ..
To use the SDK installed from GitHub, add the following to Node.js programs:
var appc = require("./netrunr-gapi-js");
To use the SDK in web applications, add these script tags:
The additional script files are:
The easiest way to get started is to install and run the Netrunr Basic Example app for Node.js.
For a list of example apps, see: Netrunr Example Apps.
In addition to the normal debugging tools for web browsers and Node.js, certain console information is also available.
JSON.stringify(object, null, 2) is useful for formatting objects for logging or display.