From the angular docs:
If you get an
ECONNREFUSED
error using a proxy targeting alocalhost
URL, you can fix this issue by updating the target fromhttp://localhost:<port>
tohttp://127.0.0.1:<port>
.See the
http-proxy-middleware
documentation for more information.