You can install the Apache Unomi Node.js SDK using npm or yarn:
npm install --save unomi-node
yarn add unomi-node
You can connect to Unomi using the connect
function:
import unomisdk from "unomi-node";
const unomi = unomisdk.connect({
url: "http://localhost:8181",
auth: {
username: "karaf",
password: "karaf"
}
});
export default unomi;
From now, everytime we refer to the variable unomi
, we're referring to the exported above Unomi instance.
Continue reading on GitBook!