feat: add go backend skeleton
This commit is contained in:
21
cmd/codex-agent-manager/main.go
Normal file
21
cmd/codex-agent-manager/main.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"codex-agent-manager/internal/app"
|
||||
)
|
||||
|
||||
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 {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user