Skip to content

Commit

Permalink
add env variables support WEB_HOST WEB_PORT
Browse files Browse the repository at this point in the history
  • Loading branch information
vintikzzz committed Jan 4, 2025
1 parent 8a6f412 commit 07a96aa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
tmp

server/data*
telepresence.log

server/server
client/client
Expand Down
14 changes: 8 additions & 6 deletions server/services/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@ const (
func RegisterWebFlags(f []cli.Flag) []cli.Flag {
return append(f,
cli.StringFlag{
Name: WebHostFlag,
Usage: "listening host",
Value: "",
Name: WebHostFlag,
Usage: "listening host",
Value: "",
EnvVar: "WEB_HOST",
},
cli.IntFlag{
Name: WebPortFlag,
Usage: "http listening port",
Value: 8080,
Name: WebPortFlag,
Usage: "http listening port",
Value: 8080,
EnvVar: "WEB_PORT",
},
)
}
Expand Down

0 comments on commit 07a96aa

Please sign in to comment.