air and home page
This commit is contained in:
23
main.go
Normal file
23
main.go
Normal 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())
|
||||
}
|
||||
Reference in New Issue
Block a user