What is the reason that 0.0.0.0
is forced to be displayed as localhost
on this line: https://github.com/nuxt/nuxt.js/blob/dev/lib/core/nuxt.js#L121? I used git blame but couldnt find a reason.
The thing is, 0.0.0.0
is not the same as localhost
. Normally localhost
runs as 127.0.0.1
so the nuxt server is only attached to the loopback interface. If you use 0.0.0.0
it means that the nuxt server will attach to all available interfaces on the server: loopback, eth0, br0, enp2s0 etc.
For me its a bit confusing as I am developing on a remote server and cant therefore use the default config localhost. But when I change it to 0.0.0.0
it still reads at localhost so sometimes when I cant reach the remote server I have to check whether my config has not been overwritten. It would be helpfull if that line could be removed so it will just read http://localhost:3000/
or http://0.0.0.0:3000