forked from goffee/core
add core services, add graph service, add component graph
This commit is contained in:
parent
59ea47dcd6
commit
7c92148ae4
7 changed files with 183 additions and 4 deletions
12
core.go
12
core.go
|
|
@ -176,6 +176,18 @@ func (app *App) RegisterRoutes(routes []Route, router *httprouter.Router) *httpr
|
|||
router.HEAD(route.Path, app.makeHTTPRouterHandlerFunc(route.Controller, route.Hooks))
|
||||
}
|
||||
}
|
||||
|
||||
// check if use letsencrypt
|
||||
UseCoreServicesStr := os.Getenv("App_USE_CORESERVICES")
|
||||
if UseCoreServicesStr == "" {
|
||||
UseCoreServicesStr = "false"
|
||||
}
|
||||
UseCoreServices, _ := strconv.ParseBool(UseCoreServicesStr)
|
||||
if UseCoreServices {
|
||||
// Register router for graphs
|
||||
router.GET("/coregraph/*graph", Graph)
|
||||
}
|
||||
|
||||
return router
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue