I am trying to make an api request to my backend server but it is giving be pending/timeout error. Everything is working as expected in localhost but when I am using it in production it is not working. In production I am using my domain.
My client server is running on port 3000 and my backend node server is running on port 5000 and nginx at port 80
Here is my Nginx code for location /api
This will be my AXIOS URL :
The request should reach my backend server but I don’t know why it is not working.
What I tried?
I tried adding my application load balancer DNS to my proxy_pass something like this :
proxy_pass http://myCompanyDev-3345035.us-east-4.elb.amazonaws.com:5000;
also
proxy_pass http://myCompanyDev-3345035.us-east-4.elb.amazonaws.com;
but still it failed to work.
I thought there is something wrong with my AXIOS_URL so I added this
REACT_APP_AXIOS_URL = http://myCompanyDev-3345035.us-east-4.elb.amazonaws.com
again it failed…
Could really use some help here.