Files
yggdrasil/common/esp32/ygg_http_server.c
T

20 lines
475 B
C
Raw Normal View History

2026-09-11 10:19:50 +02:00
#include "esp_http_server.h"
#include "ygg_http_server.h"
#include "esp_log.h"
static const char *TAG = "YGG_HTTP_SERVER";
httpd_handle_t ygg_start_webserver(void)
{
httpd_handle_t server = NULL;
httpd_config_t config = HTTPD_DEFAULT_CONFIG();
ESP_LOGI(TAG, "Starting http server on port: %d", config.server_port);
if (httpd_start(&server, &config) == ESP_OK) {
return server;
}
ESP_LOGE(TAG, "Error starting server!");
return NULL;
}