|
|
|
@ -47,9 +47,18 @@ type shrt struct {
|
|
|
|
|
func main() {
|
|
|
|
|
router := NewRouter()
|
|
|
|
|
|
|
|
|
|
s := http.StripPrefix("/css/", http.FileServer(http.Dir("./template/css/")))
|
|
|
|
|
router.PathPrefix("/css/").Handler(s)
|
|
|
|
|
s = http.StripPrefix("/img/", http.FileServer(http.Dir("./template/img/")))
|
|
|
|
|
router.PathPrefix("/img/").Handler(s)
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
http.Handle("/css/", http.StripPrefix("/css/", http.FileServer(http.Dir("template/css"))))
|
|
|
|
|
http.Handle("/img/", http.StripPrefix("/img/", http.FileServer(http.Dir("template/img"))))
|
|
|
|
|
*/
|
|
|
|
|
fmt.Printf("Shrt %s started on Port: %s \n", version, port)
|
|
|
|
|
http.Handle("/", router)
|
|
|
|
|
|
|
|
|
|
log.Fatal(http.ListenAndServe(":"+port, router))
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|