title: Read a file one line at a time in node.js?
body: <p>I am trying to read a large file one line at a time. I found <a href="http://www.quora.com/What-is-the-best-way-to-read-a-file-line-by-line-in-node-js" rel="noreferrer">a question on Quora</a> that dealt with the subject but I'm missing some connections to make the whole thing fit together.</p>
  
  <pre><code> var Lazy=require("lazy");
   new Lazy(process.stdin)
       .lines
       .forEach(
            function(line) { 
                console.log(line.toString()); 
            }
   );
   process.stdin.resume();
  </code></pre>
  
  <p>The bit that I'd like to figure out is how I might read one line at a time from a file instead of STDIN as in this sample.</p>
  
  <p>I tried: </p>
  
  <pre><code> fs.open('./VeryBigFile.csv', 'r', '0666', Process);
  
   function Process(err, fd) {
      if (err) throw err;
      // DO lazy read 
   }
  </code></pre>
  
  <p>but it's not working.  I know that in a pinch I could fall back to using something like PHP, but I would like to figure this out.  </p>
  
  <p>I don't think the other answer would work as the file is much larger than the server I'm running it on has memory for. </p>