设置静态目录

This commit is contained in:
wzj 2024-11-14 21:52:10 +08:00
parent 88fe343138
commit c16de4bbaf

View File

@ -42,6 +42,9 @@ func main() {
// And the wildcard one for index.html, *.js, *.css and e.t.c. // And the wildcard one for index.html, *.js, *.css and e.t.c.
app.Get("/swagger/{any:path}", swaggerUI) app.Get("/swagger/{any:path}", swaggerUI)
// 将网站静态根目录设置为 ./public
app.HandleDir("/", "./public")
conf := config.LoadConfig() conf := config.LoadConfig()
// init util // init util