feat: server run env config

This commit is contained in:
zchengo
2022-12-17 20:41:08 +08:00
parent ee05826cd3
commit ece9788432
2 changed files with 5 additions and 3 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
# 启动端口号 # 服务端启动配置
server: server:
port: 8000 port: 8000
runenv: dev
# MySQL数据库配置 # MySQL数据库配置
mysql: mysql:
+2 -1
View File
@@ -10,9 +10,10 @@ type Config struct {
Alipay Alipay `mapstructure:"alipay"` Alipay Alipay `mapstructure:"alipay"`
} }
// 服务启动端口号配置 // 服务启动配置
type Server struct { type Server struct {
Port int `mapstructure:"port"` Port int `mapstructure:"port"`
Runenv string `mapstructure:"runenv"`
} }
// MySQL数据库配置 // MySQL数据库配置