Explorar el Código

Change static URL

Denis V. Dedkov hace 9 años
padre
commit
b99c54e9fd
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  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))
 	}
 }