aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/xesite/main.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd/xesite/main.go b/cmd/xesite/main.go
index b4b238c..4793f38 100644
--- a/cmd/xesite/main.go
+++ b/cmd/xesite/main.go
@@ -17,6 +17,7 @@ import (
"xeiaso.net/v4/internal"
"xeiaso.net/v4/internal/lume"
"xeiaso.net/v4/pb"
+ "xeiaso.net/v4/pb/external/mi"
)
var (
@@ -88,6 +89,12 @@ func main() {
fsrv := pb.NewFeedServer(&FeedServer{fs}, twirp.WithServerPathPrefix("/api"))
mux.Handle(fsrv.PathPrefix(), fsrv)
+ es := mi.NewEventsServer(
+ mi.NewEventsProtobufClient(*miURL, http.DefaultClient),
+ twirp.WithServerPathPrefix("/api"),
+ )
+ mux.Handle(es.PathPrefix(), es)
+
mux.HandleFunc("/blog.atom", func(w http.ResponseWriter, r *http.Request) {
http.Redirect(w, r, "/blog.rss", http.StatusMovedPermanently)
})