small pixel drawing of a pufferfish vore

use main http.thingy
Jes Olson j3s@c3f.net
Sat, 20 Apr 2024 17:14:51 -0400
commit

ee4ea779364773059a099a83237a941d3b3cc1cd

parent

906811b715f07f95e4945ba92449bc72db1856c8

1 files changed, 15 insertions(+), 16 deletions(-)

jump to
M main.gomain.go

@@ -9,25 +9,24 @@ )

func main() { s := New() - mux := http.NewServeMux() - mux.HandleFunc("GET /{$}", s.indexHandler) - mux.HandleFunc("GET /{username}", s.userHandler) - mux.HandleFunc("GET /static/{file}", s.staticHandler) - mux.HandleFunc("GET /discover", s.discoverHandler) - mux.HandleFunc("GET /settings", s.settingsHandler) - mux.HandleFunc("POST /settings/submit", s.settingsSubmitHandler) - mux.HandleFunc("GET /login", s.loginHandler) - mux.HandleFunc("POST /login", s.loginHandler) - mux.HandleFunc("GET /logout", s.logoutHandler) - mux.HandleFunc("POST /logout", s.logoutHandler) - mux.HandleFunc("POST /register", s.registerHandler) - mux.HandleFunc("GET /feeds/{url}", s.feedDetailsHandler) + http.HandleFunc("GET /{$}", s.indexHandler) + http.HandleFunc("GET /{username}", s.userHandler) + http.HandleFunc("GET /static/{file}", s.staticHandler) + http.HandleFunc("GET /discover", s.discoverHandler) + http.HandleFunc("GET /settings", s.settingsHandler) + http.HandleFunc("POST /settings/submit", s.settingsSubmitHandler) + http.HandleFunc("GET /login", s.loginHandler) + http.HandleFunc("POST /login", s.loginHandler) + http.HandleFunc("GET /logout", s.logoutHandler) + http.HandleFunc("POST /logout", s.logoutHandler) + http.HandleFunc("POST /register", s.registerHandler) + http.HandleFunc("GET /feeds/{url}", s.feedDetailsHandler) // left in-place for backwards compat - mux.HandleFunc("GET /feeds", s.settingsHandler) - mux.HandleFunc("POST /feeds/submit", s.settingsSubmitHandler) + http.HandleFunc("GET /feeds", s.settingsHandler) + http.HandleFunc("POST /feeds/submit", s.settingsSubmitHandler) log.Println("main: listening on http://localhost:5544") - log.Fatal(http.ListenAndServe(":5544", mux)) + log.Fatal(http.ListenAndServe(":5544", nil)) }