Thanks for the reply Gordon. Yes it's for an ESP32 (ESP-WROOM-32) with Espruino build 1v94. Here's the full example where I get an error.
var http = require('http'); var server=http.createServer(function(req, res){ res.writeHead(200); res.end("Hello World"); console.log("res sent"); }).listen(80); setTimeout(function(){ server.close(); },5000);
And the error message I get
Uncaught Error: Field or method "close" does not already exist, and can't create it on undefined at line 1 col 7 server.close(); ^
The webserver continues to work before and after the error. I tried this on an ESP8226 and get the same error also.
Again, any help is very much appreciated.
@cmo started
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.
Thanks for the reply Gordon. Yes it's for an ESP32 (ESP-WROOM-32) with Espruino build 1v94. Here's the full example where I get an error.
And the error message I get
The webserver continues to work before and after the error. I tried this on an ESP8226 and get the same error also.
Again, any help is very much appreciated.