lasselukkari / aWOT

Arduino web server library.
MIT License
283 stars 41 forks source link

How can I convert the created header with awot-static to files that can be transfered to a folder on a sdcard? #121

Closed TheEpicFace007 closed 3 years ago

TheEpicFace007 commented 3 years ago

My webapp that I created with create-react-app is too big (12 mb)

lasselukkari commented 3 years ago

Set the "sdCard" option to true and it will generate you a file called static.bin instead of the StaticFiles.h. Copy this file to the SD card and use CardFiles example to serve your files.

Hope this helps. To be honest 12mb sound like a rather big single page app. How did it get so huge? Feel free to ask more questions if something is not clear.

TheEpicFace007 commented 3 years ago

To be honest 12mb sound like a rather big single page app

I am glad you asked! My web app is a virtual gamepad for a rc tank. I am going to publish it's source code once I am complete. I hope it's going to showcase well what can aWOT can do :)

TheEpicFace007 commented 3 years ago

here are some screenshots settings control main menu

TheEpicFace007 commented 3 years ago

Can you tell me what you think

lasselukkari commented 3 years ago

Sounds nice and look cool! But I still wonder why it takes 12mb. This whole UI fits into ESP32 program memory: http://duinodcx.herokuapp.com/index.html.

TheEpicFace007 commented 3 years ago

It mostly take a lot of space because of the fonts it's using

TheEpicFace007 commented 3 years ago

and because of the images it use since it's also a pwa

lasselukkari commented 3 years ago

Ahh ok. That explains it. Can we close the issue?

TheEpicFace007 commented 3 years ago

yes

lasselukkari commented 3 years ago

You can also send me email if you want to discuss your project more.