0

I am trying to access my angular application which is running on http://localhost:4200 . I have tried changing localhost to my actual IPV4 address 192.168.43.XXX but I m receiving the following message from the browser "This site can’t be reached".

Using http://127.0.0.1:4200 works just fine. I am running the application using ng serve.

I have tried turning off the firewall but nothing changes.

Is it necessary to run the application like this ng serve host 192.168.43.XXX ?

If so, why ?

If I remember correctly I have managed to connect from my phone using only ng serge a year ago.

Cristian Flaviu
  • 185
  • 3
  • 13
  • I don't want my application to be usable outside my Lan for now, later I will deploy it on a website. I was trying to connect to http://192.168.43.XXX:4200, so the port was specified. – Cristian Flaviu Apr 19 '21 at 19:07
  • this may help you: https://stackoverflow.com/questions/37762125/set-default-host-and-port-for-ng-serve-in-config-file – David B. Apr 20 '21 at 13:11

0 Answers0