Loading files
/**
* @file HTTPServer.cpp
* @brief HTTP router.
* @author Jeevan Sanchez
* @date 2026-07-15
*
* HOMECTRL
*/
#include <Arduino.h>
#include "HTTPServer.hpp"
HTTPServer::HTTPServer(Controller &state)
: server(80),
websocket(server, state)
{
}
void HTTPServer::begin() {
server.on("/", WebRequestMethod::HTTP_GET, [](AsyncWebServerRequest *request) {
request->send(200, "text/plain", "homectrl --online");
});
websocket.begin();
server.begin();
}
void HTTPServer::update(Controller &state) {
websocket.update(state);
}
04fc3be0cThis file is pinned to the selected release. Download the original to open it in your design tool.