air and home page

This commit is contained in:
2024-06-05 17:36:25 -04:00
parent 9754c2b793
commit 277fa92564
6 changed files with 113 additions and 1 deletions

23
main.go Normal file
View File

@@ -0,0 +1,23 @@
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())
}