Anyone tried Gulp?
Posted: Tue Mar 02, 2021 4:05 pm
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.
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
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