title: NodeJS : Parsing csv and returning the list through a promise
body: <p>I am trying to parse a csv inside a node server.</p>
  
  <p>I decided to try the csv module, installed using 'npm install csv'</p>
  
  <p>When I execute the code below, the logs display the right value for rows. But I can't manage to export this result through a promise that I can share across my environnement.</p>
  
  <pre><code>var parse = require('csv-parse')
  var csvPromise = fs.readFile('path/to/file.csv', function 
  (err, fileData) {
    return parse(fileData, {}, function(err, rows) {
      console.log('rows', rows, err)
      return rows ;
    })
  })  
  </code></pre>
  
  <p>I would like to be able to call the following code in severall places.</p>
  
  <pre><code>csvPromise.then(function (res) {return res ;})
  </code></pre>
  
  <p>I have tried severall ways but cannot find a solution. How can I manage that ?</p>