title: How do you host a React app with a Node backend on Heroku?
body: <p>I'm trying to host a React app created with <code>create-react-app</code> on a Heroku instance. It has API calls from a Node backend that I also need to be hosted. </p>
  
  <p>I have asked around and people state to serve the files built from the React app as static files using the <code>express</code> middleware. I'm not sure what that entails and all of my tries with it have led to application errors. I'm not quite sure if I need to host the built files</p>
  
  <pre><code>if (process.env.NODE_ENV === 'production') {
    app.use(express.static('~/Developer/JavaScript/Vue/fffreact/build'));
  }
  </code></pre>
  
  <p>This is what I am currently using (probably improperly) to serve the static files that I've built.</p>