I created a node API with Typescript and Javascript framework Express.JS.
This app collects humidity and temperature data generated by sensors, thanks to node app in folder tp-iot-main.
- Open a terminal and install dependencies into the root folder and tp-iot-main folder :
npm i
-
Then, create a new .env file based on .env.sample.txt and modify what you need
-
My node app runs with a Typescript compiler who transform Typescript in Javascript(ts-node), so you have to start a terminal and write :
ts-node index.ts
You have in graphs pictures some screens in Grafana, and InfluxDB Data Explorer.
In Grafana I add some threshold, it's a value that you specify for a visually crossing in your dashboard.
For Temperature, threshold orange color is for 28°C and red for 30°C.