config path

This commit is contained in:
wangchuxiao
2023-02-23 19:41:44 +08:00
parent 8bdf86172f
commit a26ca657fe
9 changed files with 43 additions and 19 deletions
+6 -1
View File
@@ -18,8 +18,9 @@ func main() {
router := api.NewGinRouter()
go third.MinioInit()
ginPort := flag.Int("port", config.Config.Api.GinPort[0], "get ginServerPort from cmd,default 10002 as port")
configPath := flag.String("config_path", "../config/", "config folder")
flag.Parse()
config.InitConfig()
config.InitConfig(*configPath)
address := "0.0.0.0:" + strconv.Itoa(*ginPort)
if config.Config.Api.ListenIP != "" {
address = config.Config.Api.ListenIP + ":" + strconv.Itoa(*ginPort)
@@ -31,3 +32,7 @@ func main() {
panic("api start failed " + err.Error())
}
}
func T() {
}