Skip to main content

Angular CLI Build, Environments, Ubuntu and Nginx Deployment, CI/CD

Learn Angular CLI Build, Environments, Ubuntu and Nginx Deployment, CI/CD (Phase 13 · Testing and Deployment (Production), Angular) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Build and environment configuration • ng build compiles to dist/<project>/browser (static files; with SSR also /server ). Build configurations in angular.json (production, staging) control optimisation, budgets, source maps and file replacements for environment files. • Generate environment files: ng generate environments → src/environments/environment.ts (dev) and environment.prod.ts . Everything in them is public : never store secrets; use them for API URLs and feature flags. • For "build once, deploy anywhere" load a runtime config.json at start ( provideAppInitializer ), so the same...

More lessons in Phase 13 · Testing and Deployment (Production)