diff --git a/main.go b/main.go index ca6b9d9..a2a2359 100644 --- a/main.go +++ b/main.go @@ -9,6 +9,7 @@ import ( "runtime" "strconv" "time" + "mime" "github.com/b3log/wide/conf" "github.com/b3log/wide/editor" @@ -273,6 +274,12 @@ func aboutHandler(w http.ResponseWriter, r *http.Request) { // 主程序入口. func main() { + + //解决Windows环境下问题 + mime.AddExtensionType(".css", "text/css") + mime.AddExtensionType(".js", "application/x-javascript") + mime.AddExtensionType(".json", "application/json") + runtime.GOMAXPROCS(conf.Wide.MaxProcs) defer glog.Flush() diff --git a/wide-ide.bat b/wide-ide.bat new file mode 100644 index 0000000..570da4e --- /dev/null +++ b/wide-ide.bat @@ -0,0 +1,3 @@ +go install +wide +pause \ No newline at end of file