Answer with what you actually did. A typical and strong setup for an Angular single-page application on Azure: Option 1 — Azure Static Web Apps (most common for SPAs) - Hosts static files globally with free SSL, custom domains and automatic CI/CD from GitHub or Azure DevOps. - The build step runs ng build and publishes the dist/<app>/browser folder. - staticwebapp.config.json configures navigationFallback to index.html (so deep links work), routes, security headers and authentication rules. - Can link a backend API (Azure Functions, App Service or Container Apps) under /api, with preview environments for every pull request. Option 2 — Azure Storage static website + Azure Front Door (or Azure CDN) - Upload the build output to the $web container of a storage account, and put Azure Front Door in front for caching, custom domains, HTTPS and WAF rules. - Configure the error document to index.html for Angular routing, and set long cache headers on hashed bundles and no-cache on index.html. Option 3 — Azure App Service - Deploy the Angular build together with an ASP.NET Core backend (served from wwwroot) or as a separate Node or static site. A web.config rewrite rule (on Windows) or fallback route sends unknown paths to index.html. - Useful when the frontend and API are released together or need server-side rendering with Node. Option 4 — Containers - Build an nginx image with the Angular files and run it on Azure Container Apps or AKS, typically for micro-frontends or when everything else is containerised. Pipeline details worth mentioning - CI runs npm ci, lint, unit tests and ng build --configuration production. - Environment-specific API URLs: build per environment, or load a runtime config.json so one build can be promoted through environments. - Separate Dev, QA and Prod environments with approvals before production. - Monitoring with Application Insights for frontend telemetry. Example answer: "We deployed to Azure Static Web Apps with a GitHub Actions workflow; the API ran on App Service. We used preview environments for pull requests and configured route fallback and security headers in staticwebapp.config.json."
Ravindra Wadile · · 0 likes