forked from tangled.org/core
this repo has no description

spindle: write a tiny message at /

Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.sh>

anirudh.fi 10b3b561 2d6f048f

verified
Changed files
+26
spindle
+26
spindle/server.go
···
func (s *Spindle) Router() http.Handler {
mux := chi.NewRouter()
+
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
+
w.Write([]byte(
+
` ****
+
*** ***
+
*** ** ****** **
+
** * *****
+
* ** **
+
* * * ***************
+
** ** *# **
+
* ** ** *** **
+
* * ** ** * ******
+
* ** ** * ** * *
+
** ** *** ** ** *
+
** ** * ** * *
+
** **** ** * *
+
** *** ** ** **
+
*** ** *****
+
********************
+
**
+
*
+
#**************
+
**
+
********
+
+
This is a spindle server. More info at https://tangled.sh/@tangled.sh/core/tree/master/docs/spindle`))
+
})
mux.HandleFunc("/events", s.Events)
mux.HandleFunc("/owner", func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte(s.cfg.Server.Owner))