Add json mime extension type

This commit is contained in:
Bjørn Erik Pedersen 2016-03-06 14:10:06 +01:00
parent d774b142e8
commit c8c6f5d05b

View file

@ -30,6 +30,7 @@ import (
"github.com/spf13/hugo/hugofs"
jww "github.com/spf13/jwalterweatherman"
"github.com/spf13/viper"
"mime"
)
var (
@ -94,6 +95,8 @@ func init() {
serverCmd.Flags().String("memstats", "", "log memory usage to this file")
serverCmd.Flags().Int("meminterval", 100, "interval to poll memory usage (requires --memstats)")
serverCmd.RunE = server
mime.AddExtensionType(".json", "application/json; charset=utf8")
}
func server(cmd *cobra.Command, args []string) error {