static const char *TAG = "http_serv"; #include "esp_log.h" #include "http_serv.hpp" httpd_handle_t start_webserver(void) { ESP_LOGI(TAG, "Starting HTTP server"); // Default configuration, EXCEPT for the wildcard URI match httpd_config_t config = HTTPD_DEFAULT_CONFIG(); config.stack_size = 4096 * 4; config.uri_match_fn = httpd_uri_match_wildcard; // Start the httpd server httpd_handle_t server = NULL; ESP_ERROR_CHECK(httpd_start(&server, &config)); return server; } void stop_webserver(httpd_handle_t server) { if (server) httpd_stop(server); }