Features
Custom URI
Serve the ESP-DASH dashboard at a custom path instead of the web server root.
By default, ESP-DASH serves the dashboard at the root path of the web server (http://<device-ip>/). To serve it at a different path, pass the URI to the ESPDash constructor.
Constructor
ESPDash(AsyncWebServer& server, const char* uri, bool enable_default_stats);Prop
Type
The defaults shown apply to the shorter overloads ESPDash(AsyncWebServer& server) and ESPDash(AsyncWebServer& server, bool enable_default_stats). There is no overload that takes only a server and a URI, so enable_default_stats must be passed explicitly when you set a custom URI.
Usage
AsyncWebServer server(80);
ESPDash dashboard(server, "/dashboard", true);The dashboard is then available at http://<device-ip>/dashboard.
Notes
- The custom URI applies only to the dashboard page. The WebSocket endpoint that the page connects to is always
/dashws, so do not register another handler at that path. - The dashboard registers its route on the server you pass in, so other routes you add to the same
AsyncWebServercontinue to work alongside it. - Authentication, if enabled, applies to the dashboard page at the custom URI.