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

Commit 59ec3fe

Browse files
author
David R. Williamson
committed
Latest eventhub package
1 parent 3253af2 commit 59ec3fe

File tree

6 files changed

+706
-641
lines changed

6 files changed

+706
-641
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ This repo contains code for a web application, which can read temperature and hu
2222
| Chrome | 76 |
2323
| Firefox | 69 |
2424

25-
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:
25+
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:
2626

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

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

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

9494
1. Watch for console output from the website.
@@ -178,7 +178,9 @@ az group create -n $resourceGroupName --location $location
178178
# Create an IoT Hub, create a consumer group, add a device, and get the device connection string
179179
az iot hub create -n $iotHubName -g $resourceGroupName --location $location --sku S1
180180
az iot hub consumer-group create -n $consumerGroupName --hub-name $iotHubName -g $resourceGroupName
181+
181182
az iot hub show-connection-string -n $iotHubName -g $resourceGroupName
183+
182184
az iot hub device-identity create -d $deviceId --hub-name $iotHubName -g $resourceGroupName
183185
az iot hub device-identity show-connection-string -d $deviceId --hub-name $iotHubName -g $resourceGroupName
184186

0 commit comments

Comments
 (0)