air
约 1 分钟阅读
- air-verse/airGitHubair-verse/airair-verse/air · GPLv3, Go · Live Reload · https://github.com/air-verse/air/blob/master/airexample.toml · air.toml 不能 extends笔记:air
- GPLv3, Go
- Live Reload
go install github.com/air-verse/air@latest
air --build.cmd "go build -o bin/api cmd/run.go" --build.bin "./bin/api"conf
FAQ
Multiple Services
- air.toml 不能 extends
.PHONY: dev-a dev-b
# 通用基础命令
AIR_BASE = air -c air.base.toml
# 启动服务 A
dev-a:
@$(AIR_BASE) \
--build.cmd "go build -o ./tmp/a ./cmds/a" \
--build.bin "tmp/a" \
--log.prefix "[Air: App A]" \
--build.include_dir "cmds/a,pkg"
# 启动服务 B
dev-b:
@$(AIR_BASE) \
--build.cmd "go build -o ./tmp/b ./cmds/b" \
--build.bin "tmp/b" \
--log.prefix "[Air: App B]" \
--build.include_dir "cmds/b,pkg"
# 使用 overmind 一起启动
dev:
overmind start -f Procfile.devapp_a: make dev-a
app_b: make dev-b关联信息
反向链接、本文链接的其他页面和外部资料。
参考资料
GitHub2 条
- air-verse/airgithub.com/air-verse/air
- air-verse/air/air_example.tomlgithub.com/air-verse/air/blob/master/air_example.toml