sorry for my english. I'm trying to deploy my vue.js website on an AWS instance. I use axios to consume my nodejs APIs, but I have a problem. When accessing the browser with the public address, in axios requests if I use localhost it does not work (I get the error http://localhost:3000/categorias net::ERR_CONNECTION_REFUSED), however if I use the public address it works correctly.
Both nodejs and vuejs are running on the same EC2 instance.
I have already tried testing my API from the console with curl -X GET localhost:3000/categories and it works, but in vue.js of my EC2 instance it does not work.
In the CORS of my nodejs I have allowed http://localhost:5173, a port that corresponds to my vue.js