fix: harden real backend workflows and channel connections
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
"cmpp-platform/gateway/internal/control"
|
||||
"cmpp-platform/gateway/internal/health"
|
||||
)
|
||||
|
||||
@@ -14,8 +15,12 @@ func main() {
|
||||
addr = ":8090"
|
||||
}
|
||||
|
||||
log.Printf("cmpp gateway health server listening on %s", addr)
|
||||
if err := http.ListenAndServe(addr, health.Handler()); err != nil {
|
||||
log.Fatalf("gateway health server stopped: %v", err)
|
||||
mux := http.NewServeMux()
|
||||
mux.Handle("/health", health.Handler())
|
||||
control.Register(mux, control.Server{APIBaseURL: os.Getenv("API_BASE_URL")})
|
||||
|
||||
log.Printf("cmpp gateway control server listening on %s", addr)
|
||||
if err := http.ListenAndServe(addr, mux); err != nil {
|
||||
log.Fatalf("gateway control server stopped: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user