so I have this Vue.js webapp which I developed on one PC, where I could always access it via either localhost:<portnr>, 127.0.0.1:<portnr> or <ip>:<portnr>.
Now I work on another PC and the project is running fine so far, the problem just is that if I enter the url with localhost or 127.0.0.1 into the browser I will get an "unable to connect error".
If I use the PCs ip or its hostname in the url I can visit the page as I normal. I wonder what the problem could be. I don't know much about networking but as the PC before probably did not have a hostname set I thought maybe this could be a problem?
When starting the project via npm run serve I get the output
App running at:
- Local: http://<host_name>:5050/
- Network: http://<ip>:5050/
On the other pc it used to print localhost instead of the hostname at the url for local access. Thank you for any hint on how to solve this!