diff --git a/internal/server/server.go b/internal/server/server.go index 22c35a0..a021676 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -5,8 +5,6 @@ import ( "fmt" "net/http" "os" - "path/filepath" - "github.com/sirupsen/logrus" "markdown-editor/internal/storage" "markdown-editor/internal/api" @@ -95,9 +93,8 @@ func (s *Server) serveStaticAssets() { s.log.Infof("Serving static assets from: %s", assetPath) - // Serve files from the dist directory - s.router.Static("/", assetPath) - s.router.Static("/assets", filepath.Join(assetPath, "assets")) + // Serve files from the dist directory - use /dist prefix to avoid conflicts with /api + s.router.Static("/dist", assetPath) } func (s *Server) Shutdown(ctx context.Context) error {