title: Read a file in Node.js
body: <p>I'm quite puzzled with reading files in Node.js. </p>
  
  <pre><code>fs.open('./start.html', 'r', function(err, fileToRead){
      if (!err){
          fs.readFile(fileToRead, {encoding: 'utf-8'}, function(err,data){
              if (!err){
              console.log('received data: ' + data);
              response.writeHead(200, {'Content-Type': 'text/html'});
              response.write(data);
              response.end();
              }else{
                  console.log(err);
              }
          });
      }else{
          console.log(err);
      }
  });
  </code></pre>
  
  <p>File <code>start.html</code> is in the same directory with file that tries to open and read it.</p>
  
  <p>However, in the console I get:</p>
  
  <blockquote>
    <p>{ [Error: ENOENT, open './start.html'] errno: 34, code: 'ENOENT', path: './start.html' }</p>
  </blockquote>
  
  <p>Any ideas?</p>