Skip to content

deviceinsight/ux4iot-admin-node

Repository files navigation

ux4iot-admin-node

ux4iot-admin-node provides a Node.js admin client for ux4iot. Use this library to easily access grant requests to the ux4iot service.

Prerequisites

In order to use this library you need to have an ux4iot instance deployed in your Azure subscription. Here is a link to a quickstart that explains how to deploy one. Here is the link to the Azure Marketplace offering.

Installation

npm install ux4iot-admin-node

Usage

import Ux4iotAdminSDK from 'ux4iot-admin-node';

const sdk = new Ux4iotAdminSDK({ connectionString: 'YOUR_UX4IOT_CONNECTION_STRING' });

const grantRequest = {
    deviceId: 'mydevice',
    sessionId: 'valid-session-id',
    type: 'telemetry',
    telemetryKey: 'mytelemetry'
}

await sdk.grant(grantRequest);

Documentation

Check out the Documentation for

  • API documentation on grant requests with ux4iot
  • Why you would need to use this library when using ux4iot
  • How to write a security backend for ux4iot

Releasing

Releases are published to npm automatically via GitHub Actions when a version tag is pushed.

  1. Bump the version in package.json (and package-lock.json) using npm:

    npm version patch   # 4.2.0 → 4.2.1
    npm version minor   # 4.2.0 → 4.3.0
    npm version major   # 4.2.0 → 5.0.0

    Use --no-git-tag-version if you want to create the commit and tag manually.

  2. Commit the version bump:

    git add package.json package-lock.json
    git commit -m "Release 4.2.0"
  3. Create and push the tag:

    git tag 4.2.0
    git push && git push --tags

The CI workflow triggers on any pushed tag, runs npm ci and npm run build, then publishes to npm using the NPM_TOKEN secret.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors