Ver código fonte

Change static URL

Denis V. Dedkov 9 anos atrás
pai
commit
b99c54e9fd
1 arquivos alterados com 3 adições e 1 exclusões
  1. 3 1
      noolite-cli.go

+ 3 - 1
noolite-cli.go

@@ -113,6 +113,8 @@ func main() {
 
 		fs := http.FileServer(http.Dir("/var/www/static"))
 
-		panic(http.ListenAndServe(fmt.Sprintf(":%d", *http_port), fs))
+		http.Handle("static", fs)
+
+		panic(http.ListenAndServe(fmt.Sprintf(":%d", *http_port), nil))
 	}
 }