Skip to content
Snippets Groups Projects
Commit 4948aa67 authored by Marin Karamihalev's avatar Marin Karamihalev
Browse files

Fixed publishing mistake and README error

parent 39de3af0
Branches
Tags 0.0.2
No related merge requests found
Pipeline #8606 passed
......@@ -10,25 +10,21 @@ Helper library for easy usp communication using mqtt over tcp or ws.
# Usage
```javascript
const connect = require("usp-js").default;
const options = {
host: "192.168.1.1",
port: 9001,
protocol: "mqtt",
username: "admin",
password: "admin",
};
const connect = require("usp-js").default
const run = async () => {
// Connect to device
const device = await connect(options);
const device = await connect({
host: "192.168.1.1",
username: "admin",
password: "admin"
});
// Get property
await get("Device.WiFi.").then(console.log);
await device.get("Device.WiFi.").then(console.log);
// Disconnect
await disconnect(session);
await device.disconnect();
};
run();
......
{
"name": "usp-js",
"version": "0.0.1",
"version": "0.0.2",
"description": "Helper library for easy usp communication using mqtt over tcp or ws.",
"main": "build/index.js",
"scripts": {
"dev": "tsc -w --outDir build",
"build": "tsc --outDir build",
"test": "npm run build && mocha tests/unit",
"test:device": "npm run build && mocha tests/integration"
"test:device": "npm run build && mocha tests/integration",
"prepublish": "npm run build"
},
"keywords": [],
"author": "Marin Karamihalev <marin.karamihalev@iopsys.eu> (http://iopsys.eu)",
......@@ -22,5 +23,5 @@
"typescript": "^4.0.5"
},
"type": "commonjs",
"types": "src/types.d.ts"
"types": "build/index.d.ts"
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment