title: Express is working with curl but not on react website
body: <p>I am attempting to do a simple website that utilizes react frontend and express backend. Right now the react website is being hosted successfully on a domain I purchased. On the same machine, there is an express server running. I can successfully call it with <code>curl http://localhost:3000/api</code>. I've added code to the react front end to console.log the results of the api endpoint. The console is showing me 404 errors from the website. Please help me understand where I have misconfigured.</p>
  <p>I have added the line <code>&quot;proxy&quot;: &quot;http://localhost:3000&quot;,</code> to package.json file.</p>
  <p>front end</p>
  <pre><code>import React, { useEffect} from 'react';
  import './App.css';
  
  function App() {
    fetch('api')
    .then(res =&gt; {
        console.log(res);
     })
  
    return (
      &lt;div className=&quot;App&quot;&gt;
        &lt;header className=&quot;App-header&quot;&gt;
          &lt;p&gt;
            Site Under Construction
          &lt;/p&gt;
        &lt;/header&gt;
      &lt;/div&gt;
    );
    
  }
  
  export default App;
  
  </code></pre>
  <p>back end</p>
  <pre><code>const express = require('express')
  const app = express()
  const port = 3000
  
  app.get('/', (req, res) =&gt; {
    res.send('Hello World!')
  })
  
  app.listen(port, () =&gt; {
    console.log(`Example app listening on port ${port}`)
  })
  
  
  // create a GET route
  app.get('/api', (req, res) =&gt; { //Line 9
    res.send({ express: 'YOUR EXPRESS BACKEND IS CONNECTED TO REACT' }); //Line 10
  }); //Line 11
  </code></pre>