evilthings/main.go
mStar aka a person 7270bd057e Same as last
2024-01-08 16:58:43 +01:00

24 lines
352 B
Go

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)
}
}