• function pageRequest(req, res) {
      res.writeHead(200);
      res.end("Hello World");
    }
    require("http").createServer(pageRequest).listen(8080); // port 8080
    

    The code like this, when the borad work, it's ok for visiting the pages which the server supply at the very first time. But when I jump for the other websites and visit back via return history of browser, the server stop. I can't visit the server website again. I have to invoke load() for restart then I access the server again.

    How to Keep web server working for long time?

About

Avatar for Robin @Robin started