Starts the web server Create an instance of HTTP server and allocate memory/resources for it depending upon the specified configuration. Example usage:
{c}
//Function for starting the webserver
httpd_handle_t start_webserver(void)
{
// Generate default configuration
httpd_config_t config = HTTPD_DEFAULT_CONFIG();
// Empty handle to http_server
httpd_handle_t server = NULL;
// Start the httpd server
if (httpd_start(&server, &config) == ESP_OK) {
// Register URI handlers
httpd_register_uri_handler(server, &uri_get);
httpd_register_uri_handler(server, &uri_post);
}
// If server failed to start, handle will be NULL
return server;
}