Why the hell this even exists?
"This is the smallest web page I wrote on a smallest server I build." - Krzysztof Jankowski
It is 2020 and you can have a coin sized web server with WiFi for less than $4. Very cool. I couldn't resist to build something with it. As a proof-of-concept I created this page.
Technical Specs
Hardware
Server is build on ESP8266-01S. It has Tensilica L106 32-bit processor running at 80 MHz and 32KiB RAM and 1MiB Flash. It is powered by any battery pack that delivers3.3V and uses WiFi 2.4Ghz to communicate with the world. Additionaly it can have humidity and moisure sensors. This version is pure web server.
Software
I'm using the ESPWiFi and SPIFFS plugins for web server. Coded in Arduino IDE. The server code takes 50 lines or less than 2KiB (I read this tutorial). Rest of the files are readed from FLASH chip. This is a simple web server but can do enything needed to serve a simple page.
Minimal Valid HTML
To get our of this super small device I needed as slip page as possible. Over the internet there are many quests to write an valid HTML file that will use the less characters. I borrowed some advices from those. Look at the source of this page. It's bare minimum. Yet it works the same on any browser and system. Also it passes WCAG for accesibility. Images needed to be 4-color GIFs but it makes the page so light. It uses 18KiB of FLASH storage.
Off The Grid
It's so small and eficient it can run for days on one 18650 cell! To send and recieve network traffic it draws 57mA to 170mA max with 80mA average. Using small Li-po makes it a mobile server that fits in any pocket. When it's not on the road it sits in the IBM x3550 Server USB port :) (look at the background image).
Summary
This was a wery fun little project. I learned that most of the HTML tags are not needed and that there are ready web server plugins for this small microcontroller. How they manage to fit a server-ready computer in such a small space for less than $4 no one knows. But it's real and ready to use.
This page was shared on reddit.com/r/selfhosted. There are a lot of intresting comments and suggestions.
For high resolution photos see my twitter post.