Improve HTTP server startup, add wrapping handler
HTTP server now initializes much earlier and mounts "waiting" router with debugging, version and health check routes. When server is fully activated it switches to "active" router. Shutdown stage is also handled with catch-all route.
This commit is contained in:
@@ -61,6 +61,7 @@ func shutdownRoutes() (r chi.Router) {
|
||||
w.Header().Set("Refresh", "15; url=/")
|
||||
_, _ = fmt.Fprint(w, "corteza server shutting down")
|
||||
})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user