diff options
| author | Xe Iaso <me@xeiaso.net> | 2024-02-24 14:50:44 -0500 |
|---|---|---|
| committer | Xe Iaso <me@xeiaso.net> | 2024-02-24 14:50:50 -0500 |
| commit | 1e2d398efe2e21ddc53a3d94b7357a91b975cfeb (patch) | |
| tree | 4e0c2c17b72a5fd04177c860e02e08113135d12d /cmd/xesite | |
| parent | b27ea6b8587f6735a309e47e1abcf3acd12f7953 (diff) | |
| download | xesite-1e2d398efe2e21ddc53a3d94b7357a91b975cfeb.tar.xz xesite-1e2d398efe2e21ddc53a3d94b7357a91b975cfeb.zip | |
start protofeed implementation, add swagger UI
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'cmd/xesite')
| -rw-r--r-- | cmd/xesite/main.go | 2 |
1 files changed, 2 insertions, 0 deletions
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) |
