mirror of
https://github.com/nielsAD/autoindex.git
synced 2026-05-06 15:06:57 +02:00
Update README.md
This commit is contained in:
31
README.md
31
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`
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user