This commit is contained in:
2026-01-13 14:55:17 +08:00
parent 30cc3b56d6
commit c87caca88a
8 changed files with 80 additions and 78 deletions

View File

@@ -30,7 +30,7 @@ func main() {
if env == "development" {
defaultConfigFile = "app/main/api/etc/main.dev.yaml"
} else {
defaultConfigFile = "etc/main.yaml"
defaultConfigFile = "app/main/api/etc/main.yaml"
}
configFile := flag.String("f", defaultConfigFile, "the config file")
flag.Parse()
@@ -61,7 +61,7 @@ func main() {
defer server.Stop()
handler.RegisterHandlers(server, svcContext)
// 自动注册API到数据库
apiRegistry := service.NewApiRegistryService(svcContext.AdminApiModel)
routes := server.Routes()
@@ -70,7 +70,7 @@ func main() {
} else {
logx.Infof("API注册成功共注册 %d 个路由", len(routes))
}
fmt.Printf("Starting server at %s:%d...\n", c.Host, c.Port)
server.Start()
}