Learning-HTMX/main.go

20 lines
359 B
Go

package main
import (
"fmt"
"github.com/a-h/templ"
"net/http"
)
func main() {
component := hello("some name")
http.Handle("/", templ.Handler(component))
staticFs := http.FileServer(http.Dir("./static"))
http.Handle("/static/", http.StripPrefix("/static/", staticFs))
fmt.Println("starting to serve on :3000")
http.ListenAndServe(":3000", nil)
}