I'm learning Go and I'm having a trouble serving static files with my server. I always get 404.
The request is for http://localhost:3001/static/breakfast.jpg
Router + fileServer
mux := chi.NewRouter()
mux.Get("/", handlers.Repo.Home)
fileServer := http.FileServer(http.Dir("./static/"))
mux.Handle("/static/*", http.StripPrefix("/static", fileServer))
Static files path
root/static/
My template homepage.tmpl
{{template "base" .}}
{{define "content"}}
<div class="container">
<div class="row">
<div class="col">
<h1>Hi from home page</h1>
<img src="/static/breakfast.jpg" width="1920" height="1080" alt="house" />
</div>
</div>
</div>
{{ end }}
What am I doing wrong?