From e5a382653f0d96054324331d7cf14b74598bb502 Mon Sep 17 00:00:00 2001 From: Thomas Ballmann Date: Tue, 11 Feb 2020 21:57:41 +0100 Subject: [PATCH] use built in method for default index file --- src/app.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/app.cpp b/src/app.cpp index d98c0a7..74b15ac 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -20,14 +20,10 @@ void setupApp() // @see https://github.com/me-no-dev/ESPAsyncWebServer - // DirectoryIndex Directive - server.on("/", HTTP_GET, [](AsyncWebServerRequest *request){ - request->send(SPIFFS, "/dist/index.html", "text/html"); - }); - // serve static files server .serveStatic("/", SPIFFS, "/dist/") + .setDefaultFile("index.html") .setCacheControl("max-age=600") ;