Deploy Angular to Vercel, Netlify, Firebase
Deploy se pehle check karo โ ghar saaf karo mehmaan aane se pehle
Pre-Deploy Checklist
- Run
ng build --configuration production - Check bundle size:
ng build --stats-json+ bundlephobia.com - Remove console.logs (or use environment check)
- Set correct API URLs for production
- Run tests:
ng test --watch=false
"Deploy se pehle check karo โ ghar saaf karo mehmaan aane se pehle"
Common mistake: API still pointing to localhost!
Deploy to Vercel (Recommended)
# Install Vercel CLI
npm i -g vercel
# Deploy
vercel
# Or connect GitHub repo โ auto-deploy on pushVercel config for Angular SSR (vercel.json):
{
"builds": [{
"src": "dist/project-name/server/server.mjs",
"use": "@vercel/node"
}],
"routes": [{
"src": "/(.*)",
"dest": "dist/project-name/server/server.mjs"
}]
}"Vercel = easy deploy โ GitHub connect karo, push karo, auto deploy"
Free tier: 100GB bandwidth, perfect for portfolio.
Deploy to Netlify
# Build command in Netlify dashboard:
ng build --configuration production
# Publish directory:
dist/project-name/browserFor SSR: use @netlify/angular adapter.
Connect GitHub repo in Netlify dashboard โ configure build command + publish directory โ deploy.
"Netlify = Vercel ka competitor โ similar process, slightly different config"
Free tier: 100GB bandwidth + 300 build minutes/month.
Deploy to Firebase Hosting
# Install Firebase CLI
npm i -g firebase-tools
# Initialize hosting
firebase init hosting
# -> Select dist/project-name/browser
# Deploy
firebase deployOr use GitHub Actions for auto-deploy.
"Firebase = Google ka hosting โ Angular ke saath natural pairing"
Good if you are already using Firebase for backend (Firestore, Auth, Functions).
Deployment Comparison
| Feature | Vercel | Netlify | Firebase |
|---|---|---|---|
| Free Tier | 100GB | 100GB | 10GB |
| SSR Support | Built-in | Adapter needed | Cloud Functions |
| Ease of Setup | Easy | Easy | Medium |
| Auto-Deploy | Git push | Git push | GitHub Actions |
| Preview Deploy | Per PR | Deploy previews | Manual |
"Sab free mein start kar sakte ho โ pick one based on your backend"
For Hyderabad portfolio: Vercel recommended (easiest, fastest SSR).
Key Takeaways
- Always build with --configuration production before deploying
- Vercel: easiest SSR deployment with auto-deploy on Git push
- Netlify: easy for static, needs adapter for SSR
- Firebase: great pairing with Firebase backend services
- Use environment files to swap API URLs between dev and prod
Want to track your progress?
Log in to save your place and pick up where you left off.
Progress track karna chahte ho?
Login karo apni progress save karne ke liye aur jahan chhoda tha wahan se shuru karo.
Login