feature (doc): embed documentation

This commit is contained in:
Mickael Kerjean
2022-09-13 12:53:02 +10:00
parent fa84e37df2
commit 66c6788b94
3 changed files with 276 additions and 0 deletions

View File

@ -113,6 +113,7 @@ func Init(a App) {
r.HandleFunc("/.well-known/security.txt", NewMiddlewareChain(WellKnownSecurityHandler, []Middleware{}, a)).Methods("GET")
r.HandleFunc("/healthz", NewMiddlewareChain(HealthHandler, []Middleware{}, a)).Methods("GET")
r.HandleFunc("/custom.css", NewMiddlewareChain(CustomCssHandler, []Middleware{}, a)).Methods("GET")
r.PathPrefix("/doc").Handler(NewMiddlewareChain(DocPage, []Middleware{}, a)).Methods("GET", "POST", "PUT", "DELETE", "OPTIONS")
if os.Getenv("DEBUG") == "true" {
initDebugRoutes(r)