npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

azure-iot-manager

v0.0.7

Published

azure api wrapper, helping to create resources required to use Azure IoT

Downloads

15

Readme

Azure IoT manager

License: MIT

Coverage Status

Build Status

Installing

npm install azure-iot-manager

Usage

Import

ES6

import * as azureIoTManager from 'azure-iot-manager';

CommonJS

const azureIoTManager = require('azure-iot-manager');

Example

Instantiating manager instance

const iotManager = azureIoTManager.init({ clientId: '***', subscriptionId: '***', tenantId: '***', clientSecret: '***' })

Creating resource group

import * as azureIoTManager from 'azure-iot-manager';
import {LocationCode} from "azure-iot-manager/lib/enums/LocationCode";


const iotManager = azureIoTManager.init({ clientId: '***', subscriptionId: '***', tenantId: '***', clientSecret: '***' })

const resourceGroup = iotManager.ResourceGroup.init(LocationCode.West_Europe, 'testResourceGroup');

Creating IoT Hub from resource group instance

const iotHub = await resourceGroup.createIoTHub(LocationCode.West_Europe, 1, TierCode.S1, 'testHub');

If you have already existing resource, do the following:

const dps = iotManager.DPS.initExisting('testDPS', 'testResourceGroup','testHub');

Using connection strings

Before doing some operation that requires connection string usage, please, make sure to call generateConnectionString() function on the instance to make sure that the string is generated(this is done, because it takes time for some resources to be in active state and calling this method from factory won't be good option).

Example

const iotHub = iotManager.IoTHub.initExisting('testHub', 'testResourceGroup');

await iotHub.generateConnectionString();

const dps = await iotHub.createDPS(LocationCode.West_Europe, TierCode.S1, 1, 'testDPS')