Caleb
0
Q:

how to serve css in golang

http.Handle("/", http.FileServer(http.Dir("css/")))
1
// if you keep all css and js in a static folder
// you can use this

func main() {
  http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("static"))))
}
1

New to Communities?

Join the community