Async Webserver on the ESP32
I've started looking around different solutions to develop a REST API on the ESP32.
This server will expose the Base station functionality mainly to the Mobile companion app.
ESP Async webserver
The first solution I found is ESP Async Webserver.
NOTE: As stated in the readme ESP Async webserver needs the Async TCP library to work on the ESP32, while on the ESP8266 the library needed is ESPAsyncTCP.
From the documentation I see few useful features for this project:
- Asynchronous meaning the webserver code shouldn't be blocking the existing logic (no code in the loop thread)
- Static file hosting
- Basic templating
- Supports POST, File uploads
While I don't plan to have an HTML interface, it would be nice to be able to create a static splash screen showing when you connect to the base ip address.
The basic Server Example is enough to get started, and includes most of the use cases needed for the base station.