feat: read codex agent definitions
This commit is contained in:
@@ -5,17 +5,13 @@ import (
|
||||
"net/http"
|
||||
|
||||
"codex-agent-manager/internal/app"
|
||||
"codex-agent-manager/internal/server"
|
||||
)
|
||||
|
||||
func main() {
|
||||
cfg := app.DefaultConfig()
|
||||
mux := http.NewServeMux()
|
||||
mux.HandleFunc("/api/health", func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
_, _ = w.Write([]byte(`{"status":"ok"}`))
|
||||
})
|
||||
fmt.Printf("Codex 智能体管理台监听 http://%s\n", cfg.HTTPAddr)
|
||||
if err := http.ListenAndServe(cfg.HTTPAddr, mux); err != nil {
|
||||
if err := http.ListenAndServe(cfg.HTTPAddr, server.New(cfg)); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user