diff --git a/main/src/main.cpp b/main/src/main.cpp index 2a8d501..552e57f 100644 --- a/main/src/main.cpp +++ b/main/src/main.cpp @@ -1,9 +1,11 @@ #include "esp_log.h" - #include #include #include +const http::response_t text_html = { + #include "res/test.html" +}; void start_ap() { nvs::init(); @@ -36,10 +38,12 @@ void start_http_server() { // TODO }}); http::set_handlers({{http::Method::get, "/", - []() { - return http::response_t{ - "Home"}; + []() { + return text_html; + //http::response_t("res/test.html") + //http::response_t{ + // "Home"}; }}, {http::Method::get, "/hello1", []() { diff --git a/res/test.html b/res/test.html new file mode 100644 index 0000000..fc7a5bf --- /dev/null +++ b/res/test.html @@ -0,0 +1,5 @@ +"" + "" + "Home" + "" +"" \ No newline at end of file