This setup allows the ESP32 to serve web pages and respond to client requests over a WiFi network that it generates (Access Point)
To make this work, you need to upload your files to the ESP32 along with the webserver.ino
file, thanks to LittleFS library.
Additional files will go to a folder named data
in the same directory as the webserver.ino
file.
To get started with the Web server library, check out this tutorial.
And also this tutorial
To upload files, you need install the ESP32 LittleFS file system uploader plugin for the Arduino IDE. Here is a tutorial on how to install the plugin
You will need to upload "data" files separately from the command palette : Upload LittleFS to Pico/ESP8266/ESP32
Warning : To upload files, the serial connection must be free. If you have started Serial monitor, kill it before uploading files.