Anyone tried Gulp?

Discussion to talk about software related topics only.
Post Reply
seulater
Posts: 445
Joined: Fri Apr 25, 2008 5:26 am

Anyone tried Gulp?

Post 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
Post Reply