Learning-HTMX/18-expenses-chart/main.go

22 lines
412 B
Go

package main
import (
"fmt"
"net/http"
"sunshine.industries/temp-exercise/templates"
"github.com/a-h/templ"
)
func main() {
component := templates.IndexPage()
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)
}