Deployment & Going Further

Ship the SPA, Then Keep Learning

Deployment & Going Further

Practical hosting notes for static SPAs and SSR apps, plus a curated path forward for going deeper with Angular.

5 min read Level 2/5 #angular#deployment#hosting
What you'll learn
  • Host a static SPA on Cloudflare Pages, Netlify, Vercel, or S3+CloudFront
  • Host an SSR app on Node-friendly hosts
  • Configure rewrites so SPA routes survive a refresh

The build is done — now ship it. Angular outputs are pretty universal, so almost any host works. The choice depends on whether you’re shipping a static SPA or an SSR app.

Static SPA

ng build (without SSR) produces a folder of static files. Upload them anywhere:

  • Cloudflare Pageswrangler pages deploy dist/my-app/browser
  • Netlify — drag-drop or netlify deploy --dir dist/my-app/browser
  • Vercelvercel --prod
  • S3 + CloudFrontaws s3 sync, set CloudFront default root + error → index.html

All of these need one config: rewrite every unmatched path to /index.html so deep links like /users/42 don’t return 404 on refresh. Netlify uses _redirects, Cloudflare uses _redirects or a function, Vercel uses vercel.json.

# Netlify _redirects in dist/my-app/browser
/*    /index.html   200

SSR Deployment

SSR needs a Node runtime. Pick a host that runs your server.mjs:

  • Render, Fly.io, Railway — Docker or buildpack-based, easy and cheap.
  • Cloudflare Workers — works with the official @angular/ssr adapter.
  • AWS Lambda / API Gateway — wrap with serverless-http.
FROM node:20-slim
WORKDIR /app
COPY . .
RUN npm ci && npm run build
EXPOSE 4000
CMD ["node", "dist/my-app/server/server.mjs"]

Going Further

You’ve covered the modern Angular surface area. Next:

  • angular.dev — the official docs, updated with every release.
  • Angular Discord — fastest help on real problems.
  • NgRx docs — when component-state isn’t enough.
  • Push-Based, inDepth.dev, Angular Architects — deep-dive blogs.
  • Build something — clone a UI you like, ship it, then refactor it.

The framework keeps evolving — signals, hydration, deferred views, and zoneless change detection are all under active development. Subscribe to the Angular blog and skim the changelog after each minor release. You’re ready.