PP2018Z/main.go

24 lines
559 B
Go
Raw Normal View History

2019-01-08 22:01:28 +01:00
package main
import (
"net/http"
"html/template"
)
var view *template.Template
func startpage(w http.ResponseWriter, r *http.Request){
view.ExecuteTemplate(w, "index.html", nil)
}
func main() {
view = template.Must(template.ParseGlob("templates/*.html"))
http.Handle("/appearance/", http.StripPrefix("/appearance/", http.FileServer(http.Dir("appearance"))))
http.HandleFunc("/", startpage)
http.ListenAndServe(":8888", nil)
}
//====================================================================================================================