Skip to content

Commit

Permalink
fix default port, set to 8080
Browse files Browse the repository at this point in the history
  • Loading branch information
mms-gianni committed Nov 9, 2023
1 parent bc346a3 commit f728b2c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@ func main() {

parser := argparse.NewParser("ladder", "Every Wall needs a Ladder")

portEnv := os.Getenv("PORT")
if os.Getenv("PORT") == "" {
portEnv = "8080"
}
port := parser.String("p", "port", &argparse.Options{
Required: false,
Default: os.Getenv("PORT"),
Default: portEnv,
Help: "Port the webserver will listen on"})

prefork := parser.Flag("P", "prefork", &argparse.Options{
Expand Down

0 comments on commit f728b2c

Please sign in to comment.