title: How to append to a file in Node?
body: <p>I am trying to <em>append</em> a string to a log file. However writeFile will erase the content each time before writing the string.</p>
  
  <pre><code>fs.writeFile('log.txt', 'Hello Node', function (err) {
    if (err) throw err;
    console.log('It\'s saved!');
  }); // =&gt; message.txt erased, contains only 'Hello Node'
  </code></pre>
  
  <p>Any idea how to do this the easy way?</p>