v1
This commit is contained in:
parent
040d5d5f15
commit
4de2ee47f4
24
main.go
Normal file
24
main.go
Normal file
@ -0,0 +1,24 @@
|
||||
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)
|
||||
|
||||
}
|
||||
|
||||
//====================================================================================================================
|
0
templates/index.html
Normal file
0
templates/index.html
Normal file
Loading…
Reference in New Issue
Block a user