Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Commit

Permalink
Latest eventhub package
Browse files Browse the repository at this point in the history
  • Loading branch information
David R. Williamson committed Apr 10, 2020
1 parent 3253af2 commit 59ec3fe
Show file tree
Hide file tree
Showing 6 changed files with 706 additions and 641 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ This repo contains code for a web application, which can read temperature and hu
| Chrome | 76 |
| Firefox | 69 |

This tutorial shows how to set up a nodejs website to visualize device data streaming to an [Azure IoT Hub](https://azure.microsoft.com/en-us/services/iot-hub) using the [event hub SDK](https://www.npmjs.com/package/@azure/event-hubs). In this tutorial, you learn how to:
This tutorial, also published [here](https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-live-data-visualization-in-web-apps), shows how to set up a nodejs website to visualize device data streaming to an [Azure IoT Hub](https://azure.microsoft.com/en-us/services/iot-hub) using the [event hub SDK](https://www.npmjs.com/package/@azure/event-hubs). In this tutorial, you learn how to:

- Create an Azure IoT Hub
- Configure your IoT hub with a device, a consumer group, and use that information for connecting a device and a service application
Expand Down Expand Up @@ -80,15 +80,15 @@ Public/index.html handles the UI layout for the web page, and references the nec
```json
"env": {
"NODE_ENV": "local",
"IotHubConnectionString": "<your iot hub connection string>",
"IotHubConnectionString": "<your IoT hub's connection string>",
"EventHubConsumerGroup": "<your consumer group name>"
}
```

1. In the same directory as package.json, run `npm install` to download and install referenced packages.

1. Run the website one of the following ways:
- From the command-line use `npm start`
- From the command-line (with environment variables set), use `npm start`
- In VS Code, press F5 to start debugging

1. Watch for console output from the website.
Expand Down Expand Up @@ -178,7 +178,9 @@ az group create -n $resourceGroupName --location $location
# Create an IoT Hub, create a consumer group, add a device, and get the device connection string
az iot hub create -n $iotHubName -g $resourceGroupName --location $location --sku S1
az iot hub consumer-group create -n $consumerGroupName --hub-name $iotHubName -g $resourceGroupName

az iot hub show-connection-string -n $iotHubName -g $resourceGroupName

az iot hub device-identity create -d $deviceId --hub-name $iotHubName -g $resourceGroupName
az iot hub device-identity show-connection-string -d $deviceId --hub-name $iotHubName -g $resourceGroupName

Expand Down
Loading

0 comments on commit 59ec3fe

Please sign in to comment.