I just wunder, how to let ESP32 plays like a traditional static webserver?
My goal ist to let Mongoose Webserver access the virtual filesystem of SD card, and fetch the file that the webserver need.
I got this idea from Mongoose's stock example HERE
This is the code snippet that do the magic, and which also not works on my machine:
Code: Select all
mg_set_protocol_http_websocket(nc);
s_http_server_opts.document_root = "."; // Serve current directory
s_http_server_opts.enable_directory_listing = "yes";
The following is actually another question:
Right now i just specify one task for Webserver, one for SD Card I/O.
It that possible to pass file pointer between tasks? If yes, is that good practise?
Thanks
Gfast2