diff --git a/proto/conf.go b/proto/conf.go index 97a207e..77e49a1 100644 --- a/proto/conf.go +++ b/proto/conf.go @@ -90,6 +90,10 @@ func ReadConfig(path string) error { err = decoder.Decode(&Config) if err != nil { fmt.Println("Error decoding config") + } else { + if Config.SERVER_PORT == "" { + Config.SERVER_PORT = "8083" // 默认端口 + } } SigningKey = []byte(Config.TOKEN_SECRET) return err