DEV Community

Discussion on: Azure and Angular Deployment in 10 minutes

Collapse
layzee profile image
Lars Gyrup Brink Nielsen • Edited

Hi John, ng serve uses the Webpack development server. It's not meant for production use. Use the ng build --prod command, then serve the files in the dist folder through an Azure app service or Azure Static Web App. Use rewrite rules to route all app routes to index.html as seen in the example here angular.io/guide/deployment#fallba.... You can also try the Azure deploy package for Angular npmjs.com/package/@azure/ng-deploy.

Angular uses Node.js, that's true. But only for development tools, not for a production web server. The compiled output is a static web app which can be served on any web host.

Collapse
jwp profile image
John Peters Author

Lars, thanks to your answer, I was able to figure out what went wrong the first time.