Initial project setup: ESP-IDF + C++ + FreeRTOS + WiFi + web server

This commit is contained in:
2026-04-01 20:34:59 -05:00
commit 4651d4c88a
24 changed files with 1032 additions and 0 deletions

24
main/web_server.hpp Normal file
View File

@@ -0,0 +1,24 @@
#ifndef WEB_SERVER_HPP
#define WEB_SERVER_HPP
#include <esp_http_server.h>
class WebServer {
public:
static WebServer& getInstance();
void start(int port = 80);
void stop();
bool isRunning() const;
private:
WebServer() = default;
static WebServer instance;
httpd_handle_t server = nullptr;
// HTTP request handlers
static esp_err_t handleRootRequest(httpd_req_t* req);
static esp_err_t handleApiRequest(httpd_req_t* req);
};
#endif // WEB_SERVER_HPP