Skip to content

Commit

Permalink
Merge pull request #1063 from sheepwall/print-listening-port
Browse files Browse the repository at this point in the history
cmd/serve: print port number
  • Loading branch information
sundowndev authored May 27, 2022
2 parents 503e24c + 3e7228b commit d8f478c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/serve.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package cmd

import (
"fmt"
"log"
"net/http"
"strconv"
Expand Down Expand Up @@ -37,6 +38,7 @@ var serveCmd = &cobra.Command{
Handler: router,
}

fmt.Printf("Listening on %s\n", httpPort)
if err := srv.ListenAndServe(); err != nil && err != http.ErrServerClosed {
log.Fatalf("listen: %s\n", err)
}
Expand Down

0 comments on commit d8f478c

Please sign in to comment.