Hey guys,
I want to load an HTML document with a template engine in Golang. I have these files:
-myGoProgram as a binary file
-/static/
-/templates/
and in my goBinary file, try to load css like this:
http.Handle("…/static/", http.StripPrefix("…/static/", http.FileServer(http.Dir(“static”))))
log.Fatal(http.ListenAndServe(":8080", router))
and inside HTML document I try to load CSS and app.js like this:
when I try to load an HTML document without Go binary file everything would load correctly. but when try to load like this:
127.0.0.1:8080/login/admin
CSS and js file won’t load
please help me to fix this issue. thank you