Skip to main content

Live Reloading

Zen applications are regular Go binaries - use air for auto-restart on file changes.

Install

go install github.com/air-verse/air@latest

Setup

air init # creates .air.toml

Adjust the binary name and entrypoint in .air.toml if needed:

[build]
cmd = "go build -o ./tmp/main ."
bin = "./tmp/main"

Run

air

Air watches .go files, rebuilds, and restarts the binary. It sends SIGTERM on restart, which Zen's graceful shutdown handles automatically.