diff --git a/server/config.yaml b/server/config.yaml index d93d190..31bced1 100644 --- a/server/config.yaml +++ b/server/config.yaml @@ -1,6 +1,7 @@ -# 启动端口号 +# 服务端启动配置 server: port: 8000 + runenv: dev # MySQL数据库配置 mysql: diff --git a/server/config/config.go b/server/config/config.go index ac18287..0a12f5b 100644 --- a/server/config/config.go +++ b/server/config/config.go @@ -10,9 +10,10 @@ type Config struct { Alipay Alipay `mapstructure:"alipay"` } -// 服务启动端口号配置 +// 服务端启动配置 type Server struct { - Port int `mapstructure:"port"` + Port int `mapstructure:"port"` + Runenv string `mapstructure:"runenv"` } // MySQL数据库配置