# air watches the Go sources and rebuilds on save. # # The bin directory is ignored on purpose: without it every rebuild would trigger # a second rebuild, and air would loop forever watching its own output. # # Run with `make dev-api`, or `make dev` for the API and the admin UI together. root = "." tmp_dir = ".cache/air" [build] # The binary goes to the same place `make build-go` puts it, so that a # hot-reloaded server and a scripted build produce identical artefacts. bin = "bin/go-bananas" cmd = "go build -o bin/go-bananas ./cmd/go-bananas" # Race detection is on by default in development. It costs roughly a doubling of # build time, which is a fair price for catching a data race in the cache layer # the first time rather than in production. full_bin = "APP_ENV=development go build -race -o bin/go-bananas ./cmd/go-bananas" include_ext = ["go", "sql", "tmpl"] # Only internal/ and cmd/ can change behaviour. Watching web/ would restart the # Go server for a CSS edit, which the Vite dev server already handles. exclude_dir = ["bin", "data", ".cache", "node_modules", "web", "sdk", "deploy", "docs"] exclude_file = [".*_test.go"] exclude_regex = ["_test\\.go$"] exclude_unchanged = true follow_symlink = false delay = 200 stop_on_error = true send_interrupt = false kill_delay = "2s" rerun = false rerun_delay = 500 [log] time = true [misc] # A clean build before the first run, so that a stale binary from an interrupted # `make build-go` cannot be the thing that appears to work. clean_on_exit = false [screen] clear_on_rebuild = false keep_scroll = true