Recently I have started using espruino and wanted to create a simple HTTP server based on the great tutorials provided here https://www.espruino.com/Internet#server .
I am using espruino 1v99 built from source both on Raspberry Pi 3B and x86_64 architecture, but currently I am facing some issues with it.
After creating the WEB server it starts up fine.
var http = require("http");
var i = 0;
http.createServer(function (req, res) {
i++;
res.writeHead(200, {'Content-Type': 'text/plain'});
res.write('Testing WEB server - ' + i + '\n')
res.end()
}).listen(8080);
Initiating a request fails with RESET:
Using the Browser, nothing is shown, only a Connection RESET error (ERR_CONNECTION_RESET)
Using the curl, it returns with "Testing WEB server - 1" and "Testing WEB server - 2", BUT with an error code: curl: (56) Recv failure: Connection reset by peer. In my understanding code56 means some serious connection issue
using wget the response is returned, but also with an error: "Read error at byte 23 (Connection reset by peer).Retrying."
Can someone help me out? I want to build a RESTful interface using HTTP.
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.
Dear Espruino community,
Recently I have started using espruino and wanted to create a simple HTTP server based on the great tutorials provided here https://www.espruino.com/Internet#server .
I am using espruino 1v99 built from source both on Raspberry Pi 3B and x86_64 architecture, but currently I am facing some issues with it.
After creating the WEB server it starts up fine.
Initiating a request fails with RESET:
Can someone help me out? I want to build a RESTful interface using HTTP.
Any help is highly appreciated!