You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
website/main.go

22 lines
316 B
Go

package main
import (
"log"
"net/http"
)
func serveHome(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, "./views/home.html")
}
func main() {
http.HandleFunc("/", serveHome)
log.Println("Listening on :8000...")
err := http.ListenAndServe(":8000", nil)
if err != nil {
log.Fatal(err)
}
}