chore: add hot reload for development

- Makefile: add dev-backend (air) and dev-frontend (vite) targets
- backend/.air.toml: air config for Go live reload
- .gitignore: exclude backend/tmp/
This commit is contained in:
Sakurasan
2026-08-30 15:33:16 +08:00
parent f3af42a65f
commit 6cc76c6767
3 changed files with 51 additions and 4 deletions
+38
View File
@@ -0,0 +1,38 @@
# Air configuration for Go hot reload
# Docs: https://github.com/air-verse/air
root = "."
tmp_dir = "tmp"
[build]
bin = "./tmp/main"
cmd = "go build -o ./tmp/main ./cmd/openteam"
delay = 1000
exclude_dir = ["tmp", "vendor", "node_modules", "frontend"]
exclude_file = []
exclude_regex = ["_test.go", ".*_test.go"]
exclude_unchanged = false
follow_symlink = false
include_dir = []
include_ext = ["go", "tpl", "tmpl", "html", "sql"]
kill_delay = "0s"
log = "build-errors.log"
send_interrupt = false
stop_on_error = true
[color]
build = "yellow"
main = "magenta"
runner = "green"
watcher = "cyan"
[log]
main_only = false
time = false
[misc]
clean_on_exit = false
[screen]
clear_on_rebuild = false
keep_scroll = true