DevPath · Learn to code ESPTEN

Deployment, environments and secrets

Where to deploy

From "works on my machine" to production

Your app lives on your laptop. For the world to use it, it needs to run on a machine that is on 24/7, accessible over the internet and resilient to failures. There are several ways to achieve this, and choosing well saves money and headaches.

PaaS (Platform as a Service)

The fastest option: you upload the code and the platform takes care of building, running and serving it. Vercel and Netlify shine for frontends and functions; Render, Railway or Fly.io run complete backends. You don't manage servers or operating systems.

# Deploying is usually as simple as connecting the repo and pushing
git push origin main   # the platform detects the change and redeploys

Containers in the cloud

A container (Docker) packages your app with its dependencies so it runs the same anywhere. You deploy it on services like Cloud Run or AWS Fargate (the provider launches and scales the containers for you) or on Kubernetes (an orchestrator that manages many containers, their health and their scaling; very powerful, but complex).

Serverless (on-demand functions)

You write functions that run only when a request arrives; the provider starts, scales and shuts them down for you. You pay per execution, not for keeping a machine on.

Static front + CDN

A SPA or a static site are files (HTML, CSS, JS). The ideal is to serve them from a CDN: a network of servers spread around the world that deliver the content from the node closest to the user. Result: very fast, very cheap and very hard to take down.

Rule of thumb: static front on CDN, API on PaaS, container or serverless depending on traffic, budget and the control you need.

Put this into practice

DevPath is a hands-on course: you read the theory here; in the app you put it into practice with exercises that really run, offline.

Start free in the app →
Environments, configuration and secrets →