handoff.toml
Every setting the file accepts. All of them are optional.
The whole file
The file sits in the root of your project. handoff init writes it, and handoff check validates it without deploying.
name = "storefront"
build = "pnpm build"
output = "dist"
[checks]
run = ["pnpm test", "pnpm smoke"]
budget = "2.5 MB"
[regions]
deploy = ["fra1", "iad1", "sfo1", "sin1", "syd1"]
[rollback]
when = "errors > 0.5%"
within = "10 min"
Build
How Handoff turns your code into something it can serve. The defaults come from the framework it detects.
build- The command that builds the app.
output- The folder the build writes to.
node- The Node version to build with. Defaults to 24.
Checks
What has to pass before any traffic moves. A deploy that fails a check stops, and the live site is not touched.
run- Commands that must exit cleanly after the build.
budget- The largest the build may be.
path- A path every region must answer with a 200.
timeout- How long to wait for that answer. Defaults to 5s.
Regions
Every deploy goes to all five regions unless you name fewer. A project needs at least one.
deploy- The region codes to deploy to.
primary- The region that takes traffic when the nearest is down.
Rollback
When to return to the previous deploy without being asked. Leave the section out to roll back only by hand.
when- The share of failed requests that triggers it.
within- How long after a deploy to keep watching.