From 8af895cb4c3fe0955b209c6e527dca5abf65f693 Mon Sep 17 00:00:00 2001 From: 13715390423 <13715390423@163.com> Date: Mon, 29 Apr 2019 16:04:09 +0800 Subject: [PATCH] debug --- osmanthuswine.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/osmanthuswine.go b/osmanthuswine.go index 21d8f47..6750c33 100644 --- a/osmanthuswine.go +++ b/osmanthuswine.go @@ -66,6 +66,8 @@ func RunProg(state overseer.State) { cc := core.GetInstanceConfig() + helper.GetInstanceLog().Out("开始监听:", cc.Host+":"+cc.Port) + r := GetChiRouter() apiRouter := cc.ApiRouter @@ -105,7 +107,7 @@ func RunProg(state overseer.State) { }) - r.Handle("/html/*", http.StripPrefix("/html/", http.FileServer(http.Dir("html")))) + r.Handle("/*", http.FileServer(http.Dir("html"))) //r.HandleFunc("/html/*", func(writer http.ResponseWriter, request *http.Request) { // path := request.URL.Path // if path == "/html/" { @@ -135,7 +137,6 @@ func RunProg(state overseer.State) { if err := http.Serve(state.Listener, r); err != nil { log.Fatal(err) } - helper.GetInstanceLog().Out("开始监听:", cc.Host+":"+cc.Port) //http.ListenAndServe(cc.Host+":"+cc.Port, r) }