add core services, add graph service, add component graph

This commit is contained in:
Zeni Kim 2024-10-28 11:33:06 -05:00
parent 59ea47dcd6
commit 7c92148ae4
7 changed files with 183 additions and 4 deletions

12
core.go
View file

@ -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
}