github.com/EngineerKamesh/gofullstack@v0.0.0-20180609171605-d41341d7d4ee/volume3/section3/server.go (about) 1 package main 2 3 import ( 4 "net/http" 5 6 "github.com/gorilla/mux" 7 ) 8 9 func main() { 10 11 r := mux.NewRouter() 12 13 fs := http.FileServer(http.Dir("./static")) 14 http.Handle("/", r) 15 http.Handle("/static/", http.StripPrefix("/static", fs)) 16 http.ListenAndServe(":8080", nil) 17 18 }