title: node.js fs.fileRead not working
body: <p>I have the following basic web server deployed using nodejitsu. I am trying to display the contents of a file. The file 'test.txt' contains a single line of plain text. I stored it on my local machine in the same folder as my 'server.js' file, than I ran jitsu deploy. The fileRead callback never seems to execute, not even the err block. Everything else runs fine. Here is the code:</p>
  
  <pre><code>// requires node's http module
  var http=require('http');
  var url=require('url');
  var fs=require('fs');
  
  // creates a new httpServer instance
  http.createServer(function (req, res) {
      // this is the callback, or request handler for the httpServer
  
      var parse=url.parse(req.url,true);
      var path=parse.pathname;
      // respond to the browser, write some headers so the 
      // browser knows what type of content we are sending
      res.writeHead(200, {'Content-Type': 'text/html'});
  
      fs.readFile('test.txt', 'utf8',function (err, data) {
          res.write('readFile complete');
          if(err){
              res.write('bad file');
              throw err;
          }
          if(data){
              res.write(data.toString('utf8'));
          }
      });
  
      // write some content to the browser that your user will see
      res.write('&lt;h1&gt;hello world!&lt;/h1&gt;');
      res.write(path);
  
      // close the response
      res.end();
  }).listen(8080); // the server will listen on port 8080
  </code></pre>
  
  <p>Thanks in advance!</p>