The links below have examples of using Arduino in conjunction with ESP8266 module for IoT applications.
https://create.arduino.cc/projecthub/projects/tags/iot
https://thingsboard.io/docs/samples/arduino/temperature/
https://nodered.org/docs/faq/interacting-with-arduino