mirror of
https://github.com/tenox7/wrp.git
synced 2024-11-22 10:31:21 +00:00
allow env var PORT to override listen address flag for Cloud RUN, etc
This commit is contained in:
parent
c80cb876ce
commit
b90300ba2d
3
wrp.go
3
wrp.go
@ -401,6 +401,9 @@ func main() {
|
||||
} else {
|
||||
headless = true
|
||||
}
|
||||
if len(os.Getenv("PORT")) > 0 {
|
||||
addr = ":" + os.Getenv(("PORT"))
|
||||
}
|
||||
n, err := fmt.Sscanf(fgeom, "%dx%dx%d", &defgeom.w, &defgeom.h, &defgeom.c)
|
||||
if err != nil || n != 3 {
|
||||
log.Fatalf("Unable to parse -g geometry flag / %s", err)
|
||||
|
Loading…
Reference in New Issue
Block a user