From af8e5907b92bb8c491b2dbb1b238483dcefed67b Mon Sep 17 00:00:00 2001 From: Branden J Brown Date: Thu, 7 May 2026 19:40:25 -0400 Subject: [PATCH] cmd/horsebot: serve data json on http For #7. --- cmd/horsebot/main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/horsebot/main.go b/cmd/horsebot/main.go index 394174a..2cce94d 100644 --- a/cmd/horsebot/main.go +++ b/cmd/horsebot/main.go @@ -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 {