mirror of
https://github.com/Crocmagnon/buzzer.git
synced 2024-11-21 15:38:06 +01:00
Add not found handler
This commit is contained in:
parent
418499aff8
commit
7904bb6707
2 changed files with 3 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
# Buzzer
|
||||
## Build
|
||||
```shell
|
||||
platformio run --target uploadfs --environment wemos_d1_mini32
|
||||
platformio run --target uploadfs
|
||||
platformio run --target upload
|
||||
```
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue