diff --git a/web/main.go b/web/main.go index 149c73f..e22e909 100644 --- a/web/main.go +++ b/web/main.go @@ -44,6 +44,7 @@ func main() { mux.HandleFunc("GET /jobs/{job_id}", handleGetJob) mux.HandleFunc("GET /jobs/{job_id}/result", handleGetResult) mux.HandleFunc("GET /health", handleHealth) + mux.HandleFunc("GET /", handleRoot) log.Println("listening on :8000") log.Fatal(http.ListenAndServe(":8000", mux)) @@ -161,6 +162,10 @@ func handleGetResult(w http.ResponseWriter, r *http.Request) { w.Write(data) } +func handleRoot(w http.ResponseWriter, r *http.Request) { + http.Redirect(w, r, "https://github.com/maxwofford/pic-to-patch", http.StatusFound) +} + func handleHealth(w http.ResponseWriter, r *http.Request) { ctx := context.Background() if err := rdb.Ping(ctx).Err(); err != nil {