title: Using Node to open index.js throws error
body: <p>I have not used Node before, but have setup an Apache localhost.</p>
  
  <p>In my directory, I have index.js which reads</p>
  
  <pre><code>var app = require('express')();
  var http = require('http').Server(app);
  
  app.get('/', function(req, res){
    res.send('&lt;h1&gt;Hello world&lt;/h1&gt;');
  });
  
  http.listen(3000, function(){
    console.log('listening on *:3000');
  });
  </code></pre>
  
  <p>and a package.json which requires Express.js.</p>
  
  <p>In the command line, I cd into the workspace and run <code>node index.js</code>. But it does not open the server and instead throws this error. <a href="https://i.stack.imgur.com/4iUcg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4iUcg.png" alt="enter image description here"></a></p>
  
  <p>What needs to be done to produce a local server listening on port 3000? 
  Node version is 6.7.0, express is 4.15.2. Running on Windows 10.</p>