View definition

func StaticMiddlewareFromDir

Defined in


StaticMiddlewareFromDir returns a middleware that serves static files from the specified http.FileSystem. This middleware is great for development because each file is read from disk each time and no special caching or cache headers are sent.

If a path is requested which maps to a folder with an index.html folder on your filesystem, then that index.html file will be served.

StaticMiddlewareFromDir is referenced in 1 repository