go-todos-app/main.go

24 lines
354 B
Go

package main
import (
"log"
"net/http"
"github.com/a-h/templ"
"michaelthomson.dev/mthomson/go-todos-app/views"
)
func main() {
router := http.NewServeMux()
home := views.Home()
router.Handle("GET /", templ.Handler(home))
server := http.Server{
Addr: "localhost:3000",
Handler: router,
}
log.Fatal(server.ListenAndServe())
}