fix
This commit is contained in:
parent
b9f879a45c
commit
4fb3bebb0a
@ -53,6 +53,8 @@ esp_err_t get_handler(httpd_req_t *req){
|
||||
|
||||
if(strstr(uri, ".js") != NULL)
|
||||
httpd_resp_set_type(req, "application/javascript");
|
||||
if(strstr(uri, ".css") != NULL)
|
||||
httpd_resp_set_type(req, "text/css");
|
||||
char chunk[1024];
|
||||
size_t chunksize;
|
||||
do {
|
||||
|
@ -41,13 +41,15 @@ void app_main(void)
|
||||
return;
|
||||
}
|
||||
|
||||
HTTP_serve_config_t serv_config = {
|
||||
HTTP_serve_config_t *serv_config = malloc(sizeof(HTTP_serve_config_t));
|
||||
|
||||
*serv_config = (HTTP_serve_config_t) {
|
||||
.mountpoint = "/http",
|
||||
.getUri = "/*",
|
||||
.postUri = "/*",
|
||||
};
|
||||
|
||||
ESP_ERROR_CHECK(start_server(serv_config));
|
||||
ESP_ERROR_CHECK(start_server(*serv_config));
|
||||
|
||||
while(1){
|
||||
vTaskDelay(100 / portTICK_PERIOD_MS);
|
||||
|
Loading…
x
Reference in New Issue
Block a user