Skip to content

Commit

Permalink
Merge pull request #27 from moul/dev/moul/better-web-interface
Browse files Browse the repository at this point in the history
Better web interface
  • Loading branch information
moul authored Jul 18, 2018
2 parents b5a5b9f + f3feeb6 commit af6c429
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/ntw-web/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,15 @@ func main() {
app.Version = ntw.Version
app.Usage = "number to number web API"

defaultListen := ":" + os.Getenv("PORT")
if defaultListen == ":" {
defaultListen = ":8000"
}
app.Flags = []cli.Flag{
cli.StringFlag{
Name: "bind, b",
Usage: "HTTP bind address",
Value: ":8000",
Value: defaultListen,
},
}
app.Action = server
Expand Down

0 comments on commit af6c429

Please sign in to comment.