Files
kidsbox/device/main/WebInterface.cpp
2021-12-26 14:05:02 +01:00

17 lines
360 B
C++

#include "WebInterface.hpp"
#include <AsyncTCP.h>
#include <ESPAsyncWebServer.h>
WebInterface::WebInterface() {
server = new AsyncWebServer(80);
}
void WebInterface::start() {
server->on("/", HTTP_GET, [](AsyncWebServerRequest *request) {
Serial.println("Received a request");
request->send(200, "text/plain", "Hello World");
});
server->begin();
}