This commit is contained in:
2023-06-18 12:42:59 +08:00
parent 02e76feee9
commit fdbb2fc2ad
2 changed files with 3 additions and 3 deletions

View File

@@ -34,8 +34,8 @@ func main() {
})
})
// 設定靜態資源 (前端) 位于public目录下
r.PathPrefix("/").Handler(http.FileServer(http.Dir("./public/")))
// 設定靜態資源 (前端) 位于dist目录下
r.PathPrefix("/").Handler(http.FileServer(http.Dir("./dist/")))
// 設定路由
r.HandleFunc("/api", routers.GetDocs).Methods("GET")