I was getting this error:
getaddrinfo ENOTFOUND localhost
Error: getaddrinfo ENOTFOUND localhost
at errnoException (dns.js:28:10)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:76:26)
when running ng serve. After web lookup, the proposed answer to this problem is to run this command instead:
ng serve --port 4200 --host 0.0.0.0
Unfortunately, the instructions came without explanation.
This works and the Angular project compiled successfully. I am not sure why. Can someone explain why this works and what has happened in the background? Thanks
