Angular2 Application over intranet
Please provide us with the following information:
OS?
Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?) Windows 10
My application is accessible with http://localhost:4200/ But not with http://ip:4200/
How can i make my application accessible over intranet.
I verified the firewall setting also.
ng serve is only intended for development. If you want to make you application accessible to others you need to build it with ng build --prod [--aot] first. You may then host the generated /dist folder using either Apache, nginx, or something simpler like http-server.
If you want your dev env to be accessible over the internet (sharing with a co worker etc) you can do ng serve --host 0.0.0.0.
0.0.0.0 will bind to all hosts on your computer instead of just localhost.
If you're talking about prod on the other hand, see the answer above.
^ what @grizzm0 said 💃
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.