diff --git a/internal/erpserver/http.go b/internal/erpserver/http.go index 19b92b0..b82c06d 100644 --- a/internal/erpserver/http.go +++ b/internal/erpserver/http.go @@ -8,6 +8,7 @@ import ( v1 "management/internal/erpserver/service/v1" mi "management/internal/pkg/middleware" "management/internal/pkg/session" + static "management/web/statics" "github.com/drhin/logger" "github.com/go-chi/chi/v5" @@ -37,7 +38,8 @@ func NewHTTPServer( // r.Use(middleware.Logger) r.Use(middleware.Recoverer) - staticServer := http.FileServer(http.Dir("./web/statics/")) + //staticServer := http.FileServer(http.Dir("./web/statics/")) + staticServer := http.FileServer(http.FS(static.StaticFS)) r.Handle("/statics/*", http.StripPrefix("/statics", staticServer)) uploadServer := http.FileServer(http.Dir("./public/"))