owl-blogs/cmd/kiss-web/static/handler.go

14 lines
209 B
Go
Raw Normal View History

2022-07-24 13:34:52 +00:00
package static
2022-07-24 14:19:21 +00:00
import (
"h4kor/kiss-social"
"net/http"
)
func StaticHandler(repo kiss.Repository) http.Handler {
return http.StripPrefix(
"/static/",
http.FileServer(http.Dir(repo.StaticDir())),
)
}