package main import ( "fmt" "net/http" "github.com/a-h/templ" ) func main() { component := page2() btn := button("Click me") http.Handle("/", templ.Handler(component)) http.Handle("/button", templ.Handler(btn)) fmt.Println("Listening on :3000") http.ListenAndServe(":3000", nil) }