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

14 lines
206 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 (
2022-08-03 14:55:48 +00:00
"h4kor/owl-blogs"
2022-07-24 14:19:21 +00:00
"net/http"
)
2022-08-03 14:55:48 +00:00
func StaticHandler(repo owl.Repository) http.Handler {
2022-07-24 14:19:21 +00:00
return http.StripPrefix(
"/static/",
http.FileServer(http.Dir(repo.StaticDir())),
)
}