diff --git a/README.md b/README.md index 792b4d3..99f9e59 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Buzzer ## Build ```shell -platformio run --target uploadfs --environment wemos_d1_mini32 +platformio run --target uploadfs platformio run --target upload ``` diff --git a/src/main.cpp b/src/main.cpp index 32ba5bf..97be26d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -110,6 +110,8 @@ void setup() server.on("/play", HTTP_GET, onPlay); server.on("/available-files", HTTP_GET, onAvailableFiles); server.on("/select-file", HTTP_POST, onSelectFile); + server.onNotFound([](AsyncWebServerRequest *request) + { request->send(404); }); server.serveStatic("/", SPIFFS, "/www/").setDefaultFile("index.html"); server.begin();