UNPKG

anniot-core

Version:
44 lines (29 loc) 647 B
# AnnIoT-NodeCore AnnIoT device client Configure account ```js var ann = require("anniot-core"); var iot = new ann.core({ mail: "mailAdress", id: "deviceId" }) ``` Connect to server ```js iot.connect(true) ``` Listen for events ```js //Connected to server iot.on("connect",function() { console.log("Connection estabilished"); //Connection verified, events started to listening iot.on("verify",function() { console.log("Connection verified"); }); //Client error handling iot.on("error",function(err) { console.log(err); }); }); ```