I just tried this, and it works for me (after some messing around). I did have to manually use f.write and trigger it though since there was no HTML form - and it wouldn't have worked anyway because the password wasn't set.
I do get the disconnect error if I specify an incorrect IP address for the MQTT server though, so I've committed a fix for that which should go live in a few hours.
Looking at your code it seems that if you POSTed to anything that wasn't / you'd have trouble since you never write a response and close the connection unless it was. I guess that might trip you up if you shut down/reset the ESP8266 while that socket is still open.
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.
I just tried this, and it works for me (after some messing around). I did have to manually use f.write and trigger it though since there was no HTML form - and it wouldn't have worked anyway because the password wasn't set.
I do get the disconnect error if I specify an incorrect IP address for the MQTT server though, so I've committed a fix for that which should go live in a few hours.
Looking at your code it seems that if you POSTed to anything that wasn't
/
you'd have trouble since you never write a response and close the connection unless it was. I guess that might trip you up if you shut down/reset the ESP8266 while that socket is still open.