This is a simple Node.js application written in JavaScript to run a simulated Azure IoT Hub device.
Make sure you have the following installed on your machine:
- Node.js - JavaScript runtime
-
Clone this repository to your local machine:
git clone https://github.com/priyanthabuddhika/azure-iot-hub-device-node.git
-
Navigate to the project directory:
cd azure-iot-hub-device-node
-
Install dependencies:
npm install
-
Open the
index.js
file in your preferred code editor. -
Locate the
main
function in the code: -
Replace
"<SMART-PLUG-CONNECTION-STRING>"
with your actual device connection string.
To run the application, use the following command:
npm run start