diff options
author | Steve Manuel <nilslice@gmail.com> | 2017-07-23 10:20:33 -0600 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2017-07-23 10:20:33 -0600 |
commit | f48dee852520bde5f7984bc2e010483518a9ce2a (patch) | |
tree | 04d6b217d512a88a8215e1d310f3a97cbb3575f9 | |
parent | 9ea0ec0e6fa0bd65c8d263a1cd418f83a3848a8b (diff) |
add default override for bind address
-rw-r--r-- | cmd/ponzu/main.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/ponzu/main.go b/cmd/ponzu/main.go index 8d293e8..fd64efc 100644 --- a/cmd/ponzu/main.go +++ b/cmd/ponzu/main.go @@ -126,7 +126,7 @@ var ErrWrongOrMissingService = errors.New("To execute 'ponzu serve', " + var serveCmd = &cobra.Command{ Use: "serve [flags] <service,service>", Aliases: []string{"s"}, - Short: "actually run the server (serve is wrapped by the run command)", + Short: "run the server (serve is wrapped by the run command)", Hidden: true, RunE: func(cmd *cobra.Command, args []string) error { if len(args) == 0 { @@ -191,6 +191,9 @@ var serveCmd = &cobra.Command{ // save the bound address the system is listening on so internal system can make // HTTP api calls while in dev or production w/o adding more cli flags + if bind == "" { + bind = "localhost" + } err = db.PutConfig("bind_addr", bind) if err != nil { log.Fatalln("System failed to save config. Please try to run again.", err) |