@Joakim, it all depends on the requirements... but thanks for your kind words. @DrAzzy's current implementation can be seen at the very beginning of this post - ESP8266 server only serves page once, sometimes twice. His needs are obviously more than satisfied with a simple dedicated implementation using switch-case to handle just 3 options.
Currently I'm deep into node.js / express / ... (and other heavy things - as whole frameworks solutions compared to (small) modules) where things are not that resource constraint... and that leads me (sometimes to go astray) to more generic than just pragmatic solutions. It is an adjustment from client and server side JS to micro controller JS.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
@Joakim, it all depends on the requirements... but thanks for your kind words. @DrAzzy's current implementation can be seen at the very beginning of this post - ESP8266 server only serves page once, sometimes twice. His needs are obviously more than satisfied with a simple dedicated implementation using switch-case to handle just 3 options.
Currently I'm deep into node.js / express / ... (and other heavy things - as whole frameworks solutions compared to (small) modules) where things are not that resource constraint... and that leads me (sometimes to go astray) to more generic than just pragmatic solutions. It is an adjustment from client and server side JS to micro controller JS.