0

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?

Pawel W
  • 11
  • 2

1 Answers1

1

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.

Dave M
  • 4,514
  • 22
  • 31
  • 30
Joshua
  • 26
  • 2