averell1
An incredibly stupid (but fast) web server
Usage
averell [{-h | --help}]
[{-p
PORT | --port=PORT}]
[{-c | --cors}]
[{-v | --verbose}]
[{-d | --debug}]
[{-a | --access}]
[{-I | --no-index}]
[directory]
Overview
This manual page documents briefly the averell.
averell is an incredibly simple web server, aiming at serving a single directory, fast.
Options
The program follows the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below.
-
-h, --help -
Show help and exit.
-
-p PORT, --port=PORT -
Set listening port (default: 8000).
-
-c, --cors -
Enable CORS (allowed origins: *).
-
-v, --verbose -
Be more verbose.
-
-d, --debug -
Debug mode (override verbose mode if any): print request and response headers.
-
-a, --access -
Read .avlaccess for per-directory properties.
-
-I, --no-index -
Do not serve index.html file automatically (can be overridden by .avlaccess).
directory
Directory to server (default: current dir).
.avlaccess file format
This section describes the .avlaccess file format.
.avlaccess files can be placed anywhere in a directory served by averell. It contains properties applicable to this directory. Properties are inherited from parent directories.
Syntax
File is parsed using the file:consult/1 function of erlang/OTP (see erlang/OTP documentation[1]). Parser is strict, be careful with ending dot, comma between tuples and no comma after last tuple.
Example of such file is given below:
[
{option1, value1},
{option2, value2}
].
Options
{index, <<"index.html">>}
When requesting a directory path, look for the given filename and serves it if it exists. 403 otherwise.
{index, noindex}
Do not server any index file when requesting a directory path. Such requests will return 403.
Notes
- 1.
-
erlang/OTP documentation
http://www.erlang.org/doc/man/file.html#consult-1