title: Difference between readFile() and readFileSync()
body: <p>The following code outputs the content of the index.html (it just contains the text hello world) to the browser. However, when I replace <code>readFile()</code> with <code>readFileSync()</code>, the request times out.</p>
  <p>What am I missing? Is a different kind of buffer required? I am using node 0.61 and express 2.4.</p>
  <pre><code>var express = require('express');
  var fs = require('fs');
  
  var app = express.createServer(express.logger());
  
  app.get('/', function(request, response) {
      fs.readFile('index.html', function(err, data){
          response.send(data.toString());
      });
  });
  
  var port = process.env.PORT || 5000;
  app.listen(port, function() {
    console.log(&quot;Listening on &quot; + port);
  });
  </code></pre>