title: How to create a CSV file on the server in nodejs
body: <p>I have the following code which works well, but I'd like this to save and write to a CSV file in the folder I'm in. I'm running the JS in node. Big thanks!</p>
  
  <pre><code>var jsonexport = require('jsonexport');
  
  json = [ { uniq_id: [ 'test' ],
      product_url: [ 'http://www.here.com' ],
      manufacturer: [ 'Disney' ]}]
  
  jsonexport(json,function(err, csv){
      if(err) return console.log(err);
      console.log(csv);
      });
  </code></pre>
  
  <p>Note: <a href="https://www.npmjs.com/package/jsonexport" rel="nofollow">jsonexport</a> is a JSON-to-CSV converter.</p>