title: Playing audio data in React from Node/Express server
body: <p>I am currently working on a feature that would allow streaming audio files in React from my Node server.</p>
  <p>I set up the server side so the GET route returns this way :</p>
  <pre><code>res.set('content-type', 'audio/mp3');
  res.set('accept-ranges', 'bytes');
  
  file.createReadStream().on(&quot;error&quot;, (err) =&gt; {
      console.log(err);
      res.status(400).json({message: &quot;Couldn't read file&quot; })
  }).on(&quot;data&quot;, (chunk) =&gt; {
      res.write(chunk);
  }).on(&quot;end&quot;, () =&gt; {
      res.end();
  })
  </code></pre>
  <p>When testing with postman, this works perfectly to get the audio (but not as streaming obviously).</p>
  <p>I am now wondering what would be the best way to handle the response on the client side. I am currently using Axios to communicate with the backend. I would like to be able to play the audio as soon as some data is available from the response.</p>
  <p>Thank you!</p>