服务默认端口

This commit is contained in:
junleea 2024-11-07 15:55:06 +08:00
parent b83195da91
commit f15a1d605b
1 changed files with 4 additions and 0 deletions

View File

@ -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