Update README.md

This commit is contained in:
Niels AD
2018-09-12 19:32:43 +02:00
committed by NielsAD
parent 98aa234030
commit b085cc951c
2 changed files with 32 additions and 3 deletions

View File

@@ -2,4 +2,33 @@ autoindex
=========
[![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](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`

View File

@@ -13,10 +13,10 @@
</head>
<body class=loading>
<header>
<ul id=path><li><a href=/>Archive</a></li></ul>
<ul id=path><li><a href="/">Archive</a></li></ul>
<form id=search><input type=text placeholder="Search.." id=q name=q><button type=submit><span>🔎</span></button></form>
</header>
<main><ul id=files></ul></main>
<footer><a href="https://www.toom.io">toom.io</a></footer>
</body>
</html>
</html>