feat: add go backend skeleton

This commit is contained in:
Yoilun
2026-05-25 16:04:26 +08:00
parent de20fda424
commit be466ae5fc
8 changed files with 156 additions and 2 deletions

View 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)
}
}