• 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.

    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:

    1. Using the Browser, nothing is shown, only a Connection RESET error (ERR_CONNECTION_RESET)
    2. 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
    3. 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.

    Any help is highly appreciated!

About

Avatar for gabika6 @gabika6 started