How to run "ng serve" command in Kudu Console to make Azure serve my Angular website -


i've created webpage , when execute

ng serve

i browse index page @ localhost:4200. then, created new app service in azure , accessed kudu console cloning page bitbucket. seems successful installing angular cli tools because can transpile dist

ng build when run service command, stuck.

the command window says webpack compiled when browse site @ whatever.azurewebsites.net, error stating

you not have permission view directory or page

which, of course, weird since i'm serving application. if suffix url /src, see contents of static index.html file poses 2 problems: (a) it's not in production file repository version (not wise distribute code openly, perhaps, , webpack's serving doesn't create physical junk @ all) , (b) doesn't render angular application (the tag app-root still empty app-root , this actual problem, of course).

googling few hours produced lot info of aims @ ci , automation. @ point, things manually gain full control , understanding, though. depending on how i've diagnosed issue, 1 of following questions should one. @ moment i'm bit confused. please have patience if i'm asking in moronic way.

  • how should exposing page?
  • do serve properly?
  • what url should enter access page?

you're attempting serve web-site twice: once ng serve , once azure app service (which using flavour of iis behind scenes). ng serve serving on http://localhost:4200 , iis serving on http://whatever.azurewebsites.net:80.

although serving on http://localhost:4200, that's not going available external machine. make work via azure app service, you'll want go application settings (found under app service in azure portal) , update virtual applications , directories section include dist folder, shown:

as you've suggested, not recommended approach serving angular application within azure app service. won't cover here you've found better sources of knowledge that.


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -