title: node.js code to open a page in browser with localhost URL
body: <p>I have written a simple server using node.js. At the moment the server responds by writing "hello world" to the browser.</p>
  
  <p>The server.js file looks like this:</p>
  
  <pre><code>var http = require("http");
  http.createServer(function(request, response) {
    response.writeHead(200, {"Content-Type": "text/plain"});
    response.write("Hello World");
    response.end();
  }).listen(8080);
  </code></pre>
  
  <p>I use this URL in the browser to trigger the "hello world" response:</p>
  
  <pre><code>http://localhost:8080/
  </code></pre>
  
  <p>I want to be able to open a basic html page when I pass a URL like this:</p>
  
  <pre><code>http://localhost:8080/test.html
  </code></pre>
  
  <p>I have looked through many tutorials and some stackoverflow posts but there was not much out there on this specific task. Does anyone know how to achieve this with a simple modification to the server.js file?</p>