I have MERN app on ec2 i am getting an error ERR connection refused when connecting localhost:8080/api/auth/sign with node api. Cannot make post calls.
What should I do?
I have MERN app on ec2 i am getting an error ERR connection refused when connecting localhost:8080/api/auth/sign with node api. Cannot make post calls.
What should I do?
I'm not sure if you have solved this, but instead of using localhost:8080, have you tried to use the Public IPv4 DNS name from your AWS instance.
So swap localhost:8080 to ec2xxxxx.eu-west-2.compute.amazonaws.com for example.
This is assuming you have a backend server running in your AWS instance.