Chat freely about anything...

User avatar
By sfranzyshen
#9602 I chose to use xxd ...

xxd -i html.gz > html.h

not only does it layout the array ...

unsigned char html_gz[] = {
0x1f, 0x8b, 0x08, 0x08, 0x4f, 0x66, 0xda, 0x54, 0x00, 0x03, 0x6e, 0x65,
...

but it also defines a variable for the size ...

unsigned int html_gz_len = 44297;
User avatar
By Sprite_tm
#9620
sfranzyshen wrote:Yes! I have looked into esphttpd as well as WebBase ... both handle httpd server very well ... neither support https (ssl). I am starting this project to create a lighterweight alternative to the full blown web server environment. my main goal here is to provide a small web app configuration utility ... that can be added to various projects ... starting with this ... http://www.esp8266.com/viewtopic.php?f=6&t=1441 ...


I'm just wondering: in what way do you think esphttpd is not lightweight? I've actually written the thing to be used exactly in the fashion you describe: a lightweight webserver thingamabob you can use to configure your esp projects with. If you think it overshoots that target, I'd love to know how.
User avatar
By bjpirt
#9632 What @sprite_tm said - esphttpd is already quite lightweight and works very well. It's easily configurable which means you can easily strip things out if you need to. Unless you just like the challenge, I'd avoid reinventing the wheel if I were you.
User avatar
By sfranzyshen
#9656
Sprite_tm wrote:I'm just wondering: in what way do you think esphttpd is not lightweight? I've actually written the thing to be used exactly in the fashion you describe: a lightweight webserver thingamabob you can use to configure your esp projects with. If you think it overshoots that target, I'd love to know how.


I never said that there was anything wrong or overkill with Sprite_tm's efforts. He has provided us all with an excellent httpd platform in which to build from. when comparing my intentions to other "full blown web server environment" I choose the words "lighterweight alternative" (notice the light "er" ) instead of "lightweight replacement" becuase my intentions where never to replace nor compete with Sprite_tm's efforts.

I simply want to add the ability to serve up (httpd) a single gzip html file from within the IoT_Demo structure. Not create a full blown httpd server. I simply do not need it!

I don't have to do this at all. I have the client html file ... that I can redistribute in many ways (internet, usb, floopy) requiring the client side to get the file. I can also use the curl utility to make changes to the esp8266 ... without a web browser at all. I can use other platforms and other development environments simutaniously to access the device (think web app & android native app ... at the same time) ... again, without a "full blown web server environment" nor a web browser. I can also do all this ... behind a SSL connection.

can esphttpd do that?

bjpirt wrote:What @sprite_tm said - esphttpd is already quite lightweight and works very well. It's easily configurable which means you can easily strip things out if you need to. Unless you just like the challenge, I'd avoid reinventing the wheel if I were you.


I'm not sure that I agree with bjpirt. I already have a json_server (Iot_Demo) that works great (except wifi scan) and is lightweight. So, I would say that esphttpd reinvented the wheel here ... and in my case ... it is simply more than I need. If you have the need for a "full blown web server environment" with a flash file system ... then go for it!

I don't :roll: