I came across a guys project where he used gulp to significantly shrink all his web site files.
This Link is about Gulp.
https://gulpjs.com/docs/en/getting-started/quick-start/
In his code he used the following when detecting index.html it requested.
Code: Select all
void handleRoot()
{
Serial.println("HandleRoot");
SPIFFS.begin();
File file = SPIFFS.open("/index.html.gz", "r");
server.streamFile(file, "text/html");
file.close();
SPIFFS.end();
}
Using NNDK 2.9.4