diff --git a/README.md b/README.md index 6f40712..da18637 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,33 @@ autoindex ========= [](https://opensource.org/licenses/MPL-2.0) -Simple go server that serves a searchable directory index in JSON format. +Lightweight `go` web server that provides a searchable directory index. Optimized for handling large numbers of files (100k+) and remote file systems (with high latency) through a continously updated directory cache. + +[Live demo](https://archive.toom.io/) + +#### Features: + +* Lightweight single-page application (`~8KB html/css/js`) +* Responsive design +* Recursive file search +* Directory cache (`sqlite`) +* Sitemap support + + +Usage +----- + +`./autoindex [options]` + +| Flag | Type | Description | +|------------|--------|-------------| +|`-a` |`string`|TCP network address to listen for connections| +|`-d` |`string`|Database location| +|`-r` |`string`|Root directory to serve| +|`-i` |`string`|Refresh interval| +|`-forwarded`|`bool` |Trust X-Real-IP and X-Forwarded-For headers| +|`-cached` |`bool` |Serve everything from cache (rather than search/recursive queries only)| + +#### Example + +`./autoindex -a=":4000" -i=5m -d=/tmp/autoindex.db -cached -r=/mnt/storage` diff --git a/public/index.html b/public/index.html index 50d3aec..a717a72 100644 --- a/public/index.html +++ b/public/index.html @@ -13,10 +13,10 @@