title: React & Express server not getting api requests in production /build
body: <p>I have a React app running successfully locally and all api requests are successfully running from a separate server.
  When I run a build, the path to the api server is lost and no data is loaded.
  Below are a few screenshots...</p>
  
  <p>Loading data successfully from api.
  <a href="https://i.stack.imgur.com/6ghAm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6ghAm.png" alt="enter image description here"></a></p>
  
  <p>Pointing IIS to react /build folder using localhost:80. No data loading.
  <a href="https://i.stack.imgur.com/y1JVz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/y1JVz.png" alt="enter image description here"></a></p>
  
  <p>Here is an example of an api call in my node/express server/index.js file</p>
  
  <pre><code>app.get('/api/company', (req, res) =&gt; {
  api_helper.GET('https://****/api/company')
      .then(response =&gt; {
          res.json(response)
      })
      .catch(error =&gt; {
          res.send(error)
      })
  </code></pre>
  
  <p>})</p>
  
  <p>My package.json file has the url of the express proxy (running in the background).</p>
  
  <pre><code>"proxy": "http://localhost:5000/",
  </code></pre>
  
  <p>My question is, why isnt the api loading in production /build? I just get this...</p>
  
  <p>Request URL: <a href="http://localhost/api/site" rel="nofollow noreferrer">http://localhost/api/site</a>
  Request Method: GET
  Status Code: 404 Not Found
  Remote Address: [::1]:80
  Referrer Policy: no-referrer-when-downgrade</p>
  
  <p>but when just running locally (npm start) I get this and data loads from api.</p>
  
  <p>Request URL: <a href="http://localhost:3000/api/site" rel="nofollow noreferrer">http://localhost:3000/api/site</a>
  Request Method: GET
  Status Code: 304 Not Modified
  Remote Address: 127.0.0.1:3000
  Referrer Policy: no-referrer-when-downgrade</p>
  
  <p>Any help appreciated, driving me mad! Thanks.</p>