Writing a program for Node.js

In this section, we create a Node.js project. You can download and install Node.js at the following link: https://nodejs.org. Create a folder called weatherfeeder.js to create our Node.js project. Within this folder, we will create the following files:

  • App.js: This is the main program from Node.js.
  • package.json: This is the configuration file for the Node.js project.
  • weather.html: This is the HTML form to display sensor data.

Figure 6.6 shows our project structure:

Figure 6.6: The project structure for weatherfeeder.js

To visualize sensor data, we can use Flot charts from https://www.flotcharts.org/. You can ...

Get Internet of Things Projects with ESP32 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.