mirror of
https://github.com/alexhopeoconnor/DFTE.git
synced 2026-10-03 22:21:59 +10:00
985 B
985 B
Streaming Async
This ESPAsyncWebServer example exposes a captive portal over a SoftAP and streams a DFTE template directly to each HTTP response. It demonstrates:
- one request-scoped
TemplateContextper response; - a PROGMEM page with shared CSS/header/footer snippets;
- runtime getters for uptime and connected-station count;
- a captive-portal DNS redirect for browsers that support it.
Build
pio run -d examples/StreamingAsync -e example_esp8266
pio run -d examples/StreamingAsync -e example_esp32
Run
- Flash your target with
pio run -d examples/StreamingAsync -e <env> -t upload --upload-port <port>. - Open the serial monitor at 115200 baud and confirm the SoftAP credentials.
- Connect to
DFTE-Portal-8266orDFTE-Portal-ESP32using passworddfte-demo. - Browse to
http://192.168.4.1/if the captive portal does not open automatically.
See the shared examples guide and async web guidance.