Stitch any CI into Tangled
151
fork

Configure Feed

Select the types of activity you want to include in your feed.

setup a better root

+28 -3
+28 -3
http.go
··· 84 84 return srv.Shutdown(shutdownCtx) 85 85 } 86 86 87 - // rootHandler responds at "/" with a small identifier. Mainly useful as a 88 - // liveness check during deployment. 87 + // rootHandler responds at "/" with a friendly identifier page. Mainly 88 + // useful as a liveness check during deployment, and as a calling card 89 + // for the curious operator who hits the root in a browser. 89 90 func rootHandler() http.HandlerFunc { 91 + // Plain-text banner. "tack" rendered in figlet's larry3d font; the 92 + // shape mirrors the style the bluesky PDS serves at its own root, 93 + // which feels like the right vibe for an atproto-adjacent service. 94 + const banner = ` __ __ 95 + /\ \__ /\ \ 96 + \ \ ,_\ __ ___\ \ \/'\ 97 + \ \ \/ /'__'\ /'___\ \ , < 98 + \ \ \_/\ \L\.\_/\ \__/\ \ \\'\ 99 + \ \__\ \__/.\_\ \____\\ \_\ \_\ 100 + \/__/\/__/\/_/\/____/ \/_/\/_/ 101 + 102 + 103 + This is a tack server: a tangled spindle for other CI services. 104 + 105 + Code: https://github.com/mitchellh/tack 106 + ` 90 107 return func(w http.ResponseWriter, r *http.Request) { 91 - fmt.Fprintln(w, "tack: a Tangled spindle backed by Buildkite") 108 + // Only respond at exactly "/" — without this guard, the 109 + // "GET /" pattern would also catch arbitrary unmatched 110 + // paths like "/foo" and lie about being the root. 111 + if r.URL.Path != "/" { 112 + http.NotFound(w, r) 113 + return 114 + } 115 + w.Header().Set("Content-Type", "text/plain; charset=utf-8") 116 + fmt.Fprint(w, banner) 92 117 } 93 118 } 94 119