You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fork from https://github.com/schollz/httpfileserver . This branch supports deflate, brotli, gzip and other methods.
8
+
7
9
8
10
9
11
This is a drop-in replacement for the stdlib `http.FileServer` that automatically provides gzipping as well as serving from memory instead of from disk. This library wraps the stdlib `http.FileServer` so you get all the benefits of that code, while also providing gzipping and keeping track of bytes and storing served files from memory when they come available.
@@ -18,6 +20,10 @@ with this version
18
20
19
21
## Usage
20
22
23
+
```
24
+
go get -u github.com/3JoB/httpfileserver
25
+
```
26
+
21
27
In order to serve files from a different directory other than specified by the route, you need to include the route when specifying a file server. For example, if you want to serve `/static` files from a local directory called `/tmp/myassets` then you can specify a new file server in the following:
0 commit comments