InitAPI
This commit is contained in:
@@ -200,7 +200,7 @@ func ExtractTokenInfo(request http.Request) (string, string, []string) {
|
|||||||
return "", "", []string{}
|
return "", "", []string{}
|
||||||
}
|
}
|
||||||
|
|
||||||
func Init(appName string) {
|
func InitAPI(appName string) {
|
||||||
InitDaemon(appName)
|
InitDaemon(appName)
|
||||||
beego.BConfig.Listen.HTTPPort = config.GetConfig().APIPort
|
beego.BConfig.Listen.HTTPPort = config.GetConfig().APIPort
|
||||||
beego.BConfig.WebConfig.DirectoryIndex = true
|
beego.BConfig.WebConfig.DirectoryIndex = true
|
||||||
@@ -215,6 +215,7 @@ func Init(appName string) {
|
|||||||
beego.InsertFilter("*", beego.BeforeRouter, c)
|
beego.InsertFilter("*", beego.BeforeRouter, c)
|
||||||
api := &tools.API{}
|
api := &tools.API{}
|
||||||
api.Discovered(beego.BeeApp.Handlers.GetAllControllerInfo())
|
api.Discovered(beego.BeeApp.Handlers.GetAllControllerInfo())
|
||||||
|
beego.Run()
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user