feat: allow change templ proxy port via env

This commit is contained in:
juancwu 2026-02-07 15:42:45 -05:00
commit 5d5c1b281d
No known key found for this signature in database

View file

@ -1,13 +1,14 @@
version: "3" version: "3"
vars: vars:
TEMPL_PROXYBIND: '{{.TEMPL_PROXYBIND | default "127.0.0.1"}}' TEMPL_PROXYBIND: '{{.TEMPL_PROXYBIND | default "127.0.0.1"}}'
TEMPL_PROXYPORT: '{{.TEMPL_PROXYPORT | default "7331"}}'
TEMPL_PROXY: '{{.TEMPL_PROXY | default "http://127.0.0.1:9000"}}' TEMPL_PROXY: '{{.TEMPL_PROXY | default "http://127.0.0.1:9000"}}'
tasks: tasks:
# Development Tools # Development Tools
templ: templ:
desc: Run templ with integrated server and hot reload desc: Run templ with integrated server and hot reload
cmds: cmds:
- go tool templ generate --watch --cmd="go run ./cmd/server/main.go" --proxybind="{{.TEMPL_PROXYBIND}}" --proxy="{{.TEMPL_PROXY}}" --open-browser=false - go tool templ generate --watch --cmd="go run ./cmd/server/main.go" --proxybind="{{.TEMPL_PROXYBIND}}" --proxyport="{{.TEMPL_PROXYPORT}}" --proxy="{{.TEMPL_PROXY}}" --open-browser=false
tailwind-clean: tailwind-clean:
desc: Clean tailwind output desc: Clean tailwind output
cmds: cmds: