0

I'm getting a proxy error

Proxy error: Could not proxy request /api/auth/signin from localhost:51171 to http://localhost:3000/

I have noticed that on the starting the server is running on two different ports...

info: Microsoft.AspNetCore.SpaServices[0]
      Starting create-react-app server on port 51171...
info: Microsoft.Hosting.Lifetime[14]
      Now listening on: http://localhost:5000
info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
      Hosting environment: Development

In the package.json I defined the proxy as follows:

"proxy": "http://localhost:3000"
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Feisser
  • 79
  • 1
  • 1
  • 12
  • Try to refer this [issue](https://stackoverflow.com/questions/45367298/could-not-proxy-request-pusher-auth-from-localhost3000-to-http-localhost500). – Xinran Shen Dec 12 '22 at 02:07

1 Answers1

0

Changed proxy to: "proxy": "http://localhost:5000" and now its working... Still dont know why smth is running on 51171

Feisser
  • 79
  • 1
  • 1
  • 12