intake/web/root.go

20 lines
343 B
Go

package web
import (
"log"
"net/http"
"github.com/Jaculabilis/intake/web/html"
)
func rootHandler(writer http.ResponseWriter, req *http.Request) {
log.Printf("%s %s", req.Method, req.URL.Path)
html.Home(writer, "world")
}
func RunServer() {
http.HandleFunc("/", rootHandler)
log.Fatal(http.ListenAndServe("localhost:8081", nil))
}