#Heroku
Platform-as-a-Service for rapid application deployment.
#Overview
Heroku is a fully managed PaaS that abstracts infrastructure complexity.
| Feature | Description |
|---|---|
| Dynos | Containerized compute units |
| Add-ons | Managed services (Postgres, Redis) |
| Buildpacks | Language runtime detection |
| Pipelines | CI/CD integration |
#Heroku CLI
bash
1# Install
2curl https://cli-assets.heroku.com/install.sh | sh
3
4# Login
5heroku login
6
7# Create app
8heroku create myapp
9
10# Deploy
11git push heroku main
12
13# View logs
14heroku logs --tail
15
16# Scale
17heroku ps:scale web=2
18
19# Run command
20heroku run bash#Procfile
procfile
web: npm start
worker: node worker.js
release: npm run migrate#When to Use
| Use Heroku | Use Other Clouds |
|---|---|
| Quick prototypes | Production scale |
| Small teams | Cost optimization |
| Simple apps | Complex architecture |
[!TIP] Pro Tip: Great for quick deployments, but can get expensive at scale!