Page 1 of 1

Anyone tried Gulp?

Posted: Tue Mar 02, 2021 4:05 pm
by seulater
I have a old project on my MOD5270B that needs a overhaul of the website it serves up. I'm short on flash space left and looking for a way to reduce my website files.
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();
}
If i drag my gulp.gz file into the html folder of my project, how can I send that file instead of index.htm ?
Using NNDK 2.9.4