From 1e2d398efe2e21ddc53a3d94b7357a91b975cfeb Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Sat, 24 Feb 2024 14:50:44 -0500 Subject: start protofeed implementation, add swagger UI Signed-off-by: Xe Iaso --- cmd/xesite/main.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cmd') diff --git a/cmd/xesite/main.go b/cmd/xesite/main.go index feae8cc..65ffbf7 100644 --- a/cmd/xesite/main.go +++ b/cmd/xesite/main.go @@ -13,6 +13,7 @@ import ( "github.com/donatj/hmacsig" "github.com/facebookgo/flagenv" _ "github.com/joho/godotenv/autoload" + "github.com/esceer/todo/swagger-ui" "github.com/twitchtv/twirp" "xeiaso.net/v4/internal" "xeiaso.net/v4/internal/lume" @@ -81,6 +82,7 @@ func main() { mux := http.NewServeMux() mux.Handle("/", http.FileServer(http.FS(fs))) mux.Handle("/api/defs/", http.StripPrefix("/api/defs/", http.FileServer(http.FS(pb.Proto)))) + mux.Handle("/api/ui/", http.StripPrefix("/api/ui", swaggerui.Handler(pb.APISpec))) ms := pb.NewMetaServer(&MetaServer{fs}, twirp.WithServerPathPrefix("/api")) mux.Handle(ms.PathPrefix(), ms) -- cgit v1.2.3