aurganize-backend/backend/.air.toml

56 lines
1.3 KiB
TOML

# ============================================================================
# AIR CONFIGURATION - HOT RELOAD FOR GO
# ============================================================================
# backend/.air.toml
# Air configuration for hot reload
# Root directory to watch
root = "."
# Working directory
tmp_dir = "tmp"
[build]
# Command to run after detecting changes
# NOTE : we are adding option -mod=mod to ignore vendor folder even if it exist and only use go modules
cmd = "go build -mod=mod -o ./tmp/main.exe ./cmd/api"
# Binary name
bin = "tmp/main.exe"
# Exclude directories from watching
exclude_dir = ["assets", "tmp", "frontend", "node_modules"]
# Include file extensions to watch
include_ext = ["go", "tpl", "tmpl", "html"]
# Exclude file patterns
exclude_file = ["*_test.go"]
# Delay before restarting (milliseconds)
delay = 1000
# Stop running old binary before building
stop_on_error = true
# Send Interrupt signal (Ctrl+C) before kill
send_interrupt = true
# Delay after sending interrupt
kill_delay = 500
[log]
# Show log time
time = true
[color]
# Colored output
main = "magenta"
watcher = "cyan"
build = "yellow"
runner = "green"
[misc]
# Delete tmp folder on exit
clean_on_exit = true