Potion/examples/main.go
Hayden Hargreaves e8d4d8d8ab (DOCS): Created the Project Structure guide.
This serves as outsider notes as well as my own reference sheet.
2025-06-13 14:59:39 -07:00

20 lines
295 B
Go

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)
}