You will need to modify the doGet() function at the bottom to serve your content.
function doGet(req,res){
var a = url.parse(req.url, true);
console.log("Get");
res.writeHead(200, {'Content-Type': 'text/html'});
res.write(KMtext);
res.end("");
}
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.
Attached file contains code to serve HTML. It does both a Get and Post method.
You will need to edit the SSID and router password.
Adjust the serial port stuff to fit your hardware.
The IP address will display in the WebIDE
Mine was 192.168.3
I used it in the Browser as follows:
http://192.168.1.3:8080/
You will need to modify the doGet() function at the bottom to serve your content.
1 Attachment