json loading works now---> now to css

This commit is contained in:
richonguzman 2023-08-31 08:17:31 -04:00
parent 72fcf9d732
commit 6c1a8d155f
2 changed files with 33 additions and 0 deletions

View file

@ -280,15 +280,24 @@ void startServer() {
request->send(SPIFFS, "/index3.html", "text/html");
});
server.on("/test4", HTTP_GET, [](AsyncWebServerRequest *request) {
request->send(SPIFFS, "/index4.html", "text/html");
});
server.on("/testx", HTTP_GET, [](AsyncWebServerRequest *request) {
request->send(SPIFFS, "/testx.html", "text/html");//"application/json");
});
//setDefaultFile("testx.html");
if (Config.ota.username != "" && Config.ota.password != "") {
AsyncElegantOTA.begin(&server, Config.ota.username.c_str(), Config.ota.password.c_str());
} else {
AsyncElegantOTA.begin(&server);
}
server.serveStatic("/", SPIFFS, "/");
server.begin();
Serial.println("init : OTA Server ... done!");
}