diff options
author | Eli Flanagan <efx@users.noreply.github.com> | 2020-02-03 20:29:53 +0000 |
---|---|---|
committer | Eli Flanagan <efx@users.noreply.github.com> | 2020-02-03 20:29:53 +0000 |
commit | bbe3cb3975f011b40d94c155bc0e80e0bd6ce391 (patch) | |
tree | f8611361f5f097707682fe4e98527fd2a574a94a | |
parent | Merge branch 'master' into fix-156 (diff) | |
download | miniserve-bbe3cb3975f011b40d94c155bc0e80e0bd6ce391.tar.gz miniserve-bbe3cb3975f011b40d94c155bc0e80e0bd6ce391.zip |
add Lucretiel's documentation suggestion
Diffstat (limited to '')
-rw-r--r-- | src/args.rs | 5 | ||||
-rw-r--r-- | src/main.rs | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/args.rs b/src/args.rs index ad5f1d6..95ddaf7 100644 --- a/src/args.rs +++ b/src/args.rs @@ -27,7 +27,10 @@ struct CLIArgs { #[structopt(name = "PATH", parse(from_os_str))] path: Option<PathBuf>, - /// name of an index file to serve by default + /// The name of a directory index file to serve, like "index.html" + /// + /// Normally, when miniserve serves a directory, it creates a listing for that directory. + /// However, if a directory contains this file, miniserve will serve that file instead. #[structopt(long, parse(from_os_str), name="index_file")] index: Option<PathBuf>, diff --git a/src/main.rs b/src/main.rs index c31341e..11cf5c7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -52,7 +52,10 @@ pub struct MiniserveConfig { /// Default color scheme pub default_color_scheme: themes::ColorScheme, - /// name of an index file to serve by default + /// The name of a directory index file to serve, like "index.html" + /// + /// Normally, when miniserve serves a directory, it creates a listing for that directory. + /// However, if a directory contains this file, miniserve will serve that file instead. pub index: Option<std::path::PathBuf>, /// Enable file upload |