cmd/horsebot: serve data json on http

For #7.
This commit is contained in:
2026-05-07 19:40:25 -04:00
parent 9cf9fd198f
commit af8e5907b9

View File

@@ -113,6 +113,7 @@ func main() {
mux := http.NewServeMux()
mux.Handle("GET /", httpmiddle.Compress(5)(http.FileServerFS(os.DirFS(public))))
mux.Handle("GET /api/data/", httpmiddle.Compress(5)(http.StripPrefix("/api/data", http.FileServerFS(os.DirFS(dataDir)))))
if pubkey != "" {
pk, err := hex.DecodeString(pubkey)
if err != nil {