diff --git a/main.go b/main.go index 7127fb2..5f8d1cb 100644 --- a/main.go +++ b/main.go @@ -92,6 +92,7 @@ func main() { r.HandleFunc("/img/{id}", routers.WebpGet).Methods("GET") // 設定靜態資源 (前端) 位于dist目录下 + r.PathPrefix("/images/").Handler(http.FileServer(http.Dir("./data/"))) r.PathPrefix("/").Handler(http.FileServer(http.Dir("./dist/"))) log.Println("Web Server is running on http://localhost:8080")