Skip to content

Commit

Permalink
bind to port
Browse files Browse the repository at this point in the history
  • Loading branch information
le0pard committed Jul 23, 2024
1 parent aca2c20 commit a24a98a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Configuration environment variables:

```ini
POSTAL_SERVER_HOST - server host (default: 0.0.0.0)
POSTAL_SERVER_PORT - server port (default: 8000)
POSTAL_SERVER_PORT or PORT - server port (default: 8000)
POSTAL_SERVER_TRUSTED_PROXIES - trusted proxies IP addresses (separated by comma)
POSTAL_SERVER_LOG_FORMAT - log format, can be "json" or "text" (default: "text")
POSTAL_SERVER_LOG_LEVEL - log level (default: "info")
Expand Down
1 change: 1 addition & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ func init() {
viper.BindPFlag("host", rootCmd.PersistentFlags().Lookup("host"))
rootCmd.PersistentFlags().IntP("port", "p", 8000, "server port")
viper.BindPFlag("port", rootCmd.PersistentFlags().Lookup("port"))
viper.BindEnv("port", "PORT")
rootCmd.PersistentFlags().StringSliceP("trusted_proxies", "t", []string{}, "trusted proxies IP addresses (separated by commas)")
viper.BindPFlag("trusted_proxies", rootCmd.PersistentFlags().Lookup("trusted_proxies"))

Expand Down

0 comments on commit a24a98a

Please sign in to comment.