update static and staticAssetsHandler

Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
Jess Frazelle 2018-09-17 15:33:45 -04:00
parent 0301f323b3
commit 691235af75
No known key found for this signature in database
GPG key ID: 18F3685C0022BFF3

View file

@ -167,8 +167,9 @@ func (cmd *serverCommand) Run(ctx context.Context, args []string) error {
}
// Serve the static assets.
staticHandler := http.FileServer(static.Assets)
mux.PathPrefix("/static/").Handler(http.StripPrefix("/static/", staticHandler))
staticAssetsHandler := http.FileServer(static.Assets)
mux.PathPrefix("/static/").Handler(http.StripPrefix("/static/", staticAssetsHandler))
staticHandler := http.FileServer(http.Dir(staticDir))
mux.Handle("/", staticHandler)
// Set up the server.