glob101/router/static.go
John Olheiser 67650ce6c1 Real router and real assets (#4)
Fix imports and change CLI colors

Signed-off-by: jolheiser <john.olheiser@gmail.com>

Real router and real assets

Signed-off-by: jolheiser <john.olheiser@gmail.com>

Co-authored-by: jolheiser <john.olheiser@gmail.com>
Reviewed-on: #4
2020-01-31 03:59:55 +00:00

16 lines
281 B
Go

package router
import (
"net/http"
"github.com/markbates/pkger"
)
func css() http.Handler {
return http.StripPrefix("/css/", http.FileServer(pkger.Dir("/static/css/")))
}
func js() http.Handler {
return http.StripPrefix("/js/", http.FileServer(pkger.Dir("/static/js/")))
}