Files
htmx/main.go
2024-02-24 21:51:34 -06:00

22 lines
327 B
Go

package main
import (
"fmt"
"log"
"net/http"
"text/template"
)
func main() {
fmt.Println("hello world")
h1 := func(w http.ResponseWriter, r *http.Request) {
tmpl := template.Must(template.ParseFiles("index.html"))
tmpl.Execute(w, nil)
}
http.HandleFunc("/", h1)
log.Fatal(http.ListenAndServe(":8000", nil))
}