title: Trying to serve React SPA that uses react-router
body: <p>Im using Gorilla/Mux for routing and want to serve the React SPA regardless of the URL path. </p>
  
  <pre><code>func main() {
  fmt.Println("server running...")
  
  hub := newHub()
  go hub.run()
  
  router := mux.NewRouter()
  router.HandleFunc("/api/create", Api)
  router.HandleFunc("/api/getpoll", Api)
  router.HandleFunc("/api/update", Api)
  
  router.HandleFunc("/sockets/{id}", func(w http.ResponseWriter, r 
  *http.Request) {
      Socketme(hub, w, r)
  })
  
  //  router.HandleFunc("/{rest:.*}", emberHandler)
  router.PathPrefix("/").HandlerFunc(serveFile)
  log.Fatal(http.ListenAndServe(":5000", router))
  }
  
   func serveFile(w http.ResponseWriter, r *http.Request) {
  http.FileServer(http.Dir("./public/build")).ServeHTTP(w, r)
  }
  </code></pre>
  
  <p>Dont want Go to give 404s the Spa should be handling these routes.</p>