█
LastWrite
  • > Curriculum
  • > Pricing
  • > For Educators
  • > About
  • > Contact
Log InGet Started

Questions, concerns, bug reports, or suggestions? We read every message, write to us at [email protected].

More ways to reach us →
LastWrite

Structured computer science lessons for aspiring developers and security professionals.

[email protected]

(201) 785-7951

Mon–Fri, 9 AM–5 PM EST

Learn

  • Curriculum
  • Pricing

Company

  • About
  • For Educators & Schools
  • Contact Us

Legal

  • Terms of Service
  • Privacy Policy
© 2026 LastWrite. All rights reserved.
Curriculum/DevOps and Infrastructure/Cloud Platforms — Microsoft Azure/Azure App Service
45 minIntermediate

Azure App Service

After this lesson, you will be able to: Deploy a web app to Azure App Service with deployment slots (staging/production), scaling, custom domains, and SSL.

App Service is Azure's flagship PaaS. The 'just give me a URL with auto-TLS' service. Most Azure web workloads start here.

Prerequisites:Entra ID

App Service basics

Supports: .NET, Java, Node, Python, PHP, Ruby, custom containers. Deploy from: git push, zip upload, GitHub Actions, Azure DevOps, container registry. Built-in: SSL, custom domains, autoscaling, deployment slots, easy auth, application insights. App Service Plan is the underlying compute (think 'shared VM'). Multiple apps can share one plan to save cost.

Deploy a Node.js app

az CLI in 4 commands.

tsx
# 1. Create resource group
az group create -n rg-myapp -l eastus
# 2. Create App Service Plan (the VM pool)
az appservice plan create -n plan-myapp -g rg-myapp --sku B1 --is-linux
# 3. Create the web app
az webapp create -n myapp-yourname -g rg-myapp --plan plan-myapp --runtime 'NODE:20-lts'
# 4. Deploy from local git
az webapp deployment source config-local-git -n myapp-yourname -g rg-myapp
git remote add azure <git-url-from-previous-command>
git push azure main
# Now myapp-yourname.azurewebsites.net is live.
# Alternative: deploy a Docker image
az webapp create -n myapp-yourname -g rg-myapp --plan plan-myapp \
--deployment-container-image-name ghcr.io/me/myapp:1.0

Deployment slots (the killer feature)

Production app at myapp.azurewebsites.net. Add a 'staging' slot = staging.myapp.azurewebsites.net. Deploy new code to staging; smoke test on the public URL. Swap: staging ↔ production. Atomic, instant cutover. If it breaks, swap back. Each slot has its own settings (env vars, connection strings), you mark which settings 'stick to slot' and which 'swap with code'. Equivalent of AWS blue/green built into the service. Free on Standard tier and up.

Scaling

Vertical (scale up): change the App Service Plan SKU. Bigger VMs. Horizontal (scale out): more instances. Manual count or autoscale rules. Autoscale: based on CPU / memory / queue depth / custom metric. Set min and max. Premium plans: more instances, faster, more memory, better networking. Consumption plan: pay only for what runs (Functions-style); good for spiky workloads.

Custom domains + SSL

Default URL: <appname>.azurewebsites.net. Custom domain: add a TXT record to verify ownership; add A or CNAME records. SSL: free via App Service Managed Certificate (auto-renewing); custom certs via Key Vault. Force HTTPS: turn on in TLS / SSL settings. Default is allow HTTP.

Common mistakes only experienced engineers avoid

Running 1 app on a Premium plan when 10 apps could share a Basic plan. App Service Plan is the cost; apps are free. Storing connection strings in app code. Use App Service Configuration (encrypted) or Key Vault references. Skipping deployment slots. Every prod deploy without a slot swap is a risk. No Application Insights. APM is one toggle away; turn it on. Mounting Storage Account credentials manually when Managed Identity works.

Quick Check

Your team deploys via 'git push' straight to production. What's the safest upgrade?

Pick the senior pattern.

Sign in and purchase access to unlock this lesson.

Sign in to purchase
←Entra ID (Azure AD)
Back to Cloud Platforms — Microsoft Azure
Azure Functions→