U
U
UntitledNikname2020-09-13 22:49:24
go
UntitledNikname, 2020-09-13 22:49:24

Why are static files not opening?

app
   cmd
      myapp
         main.go
   web
      static
         css/
         img/


type Server struct {
       router *mux.Router
             ....
       }

  s.router.Handle("/static/", http.FileServer(http.Dir("web/static/")))
  s.router.HandleFunc("/", s.handleIndex())


Doesn't want to open (for example) static/img/favicon.ico = 404. Checking if the folder exists passes. What am I doing wrong ?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question