f
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user