But if you try to access the local IP address directly: Using just the default ng serve you generally use localhost:4200 to access the Web server: This is what the dev server is designed for and that of course works. In Angular you run the live reload server with: ng serve Turns out - there's an easier way: It's quite easy set up the WebPack Web Server to externally expose an IP address, which would allow your phone to access the live reload server over the local network. Making a change then takes some more time. This works but it's not exactly quick since building the app for final output can take a while. It's not quite obvious, and in the past I've been doing this the hard wrong way, by building the app and then running it through another always on Web server (IIS). By default this server is set up to run as a local Web server, but you can set it up quite easily to also serve IP traffic externally. Live Reload ServerĪngular and a number of other tools use the WebPack development server. The syntax may be different so check the specific CLI documentation for host binding.
0 Comments
Leave a Reply. |