Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
21 lines (17 sloc) 397 Bytes
package main
import (
. "github.com/paulbellamy/mango"
"github.com/sunfmin/gowebapp/routes"
"net/http"
)
func main() {
mux := http.NewServeMux()
mux.Handle("/", routes.NewMux())
mux.HandleFunc("/assets/", func(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, "./public"+r.URL.Path)
})
err := http.ListenAndServe("localhost:8000", mux)
if err != nil {
panic(err)
}
}