package main import ( "embed" "log" "net/http" "os" ) //go:embed templates var embed_templates embed.FS func main() { port := os.Getenv("PORT") if port == "" { port = "8080" log.Printf("Defaulting to port %s \n", port) } http.HandleFunc("/", handleRoot) if err := http.ListenAndServe(":"+port, nil); err != nil { log.Fatal(err) } }