title: Proxy error: Could not proxy request /api/register from localhost:3000 to http://localhost:8000/ (ECONNREFUSED)
body: <p>I have a React frontend that uses jwt to authenticate with the laravel backend. The backend works and is connecting just fine using laravel views, but when I try to proxy a request from React, it gives me a Connection Refused error.</p>
  
  <blockquote>
    <p>Proxy error: Could not proxy request /api/register from localhost:3000
    to <a href="http://localhost:8000/" rel="nofollow noreferrer">http://localhost:8000/</a> (ECONNREFUSED).</p>
  </blockquote>
  
  <p>Connecting to <a href="http://localhost:8000/api/register" rel="nofollow noreferrer">http://localhost:8000/api/register</a> works normally. And sending a POST request with Axios also works normally and returns the token json. But when I proxy it with node, it doesn't work.</p>
  
  <p>in my package.json code is </p>
  
  <pre><code>"proxy": "http://localhost:8000",
  </code></pre>
  
  <p>Please anyone help me. how to fixed it?</p>