From ecb3984edc392f47e8eb396f1518fc5cee7c826a Mon Sep 17 00:00:00 2001 From: sigoden Date: Thu, 2 Jun 2022 17:10:15 +0800 Subject: [PATCH] chore(readme): insert cli output --- README.md | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index beac6ea..74e80e8 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,38 @@ Serve https duf --tls-cert my.crt --tls-key my.key ``` -### Api +## CLI + +``` +Duf is a fully functional file server. + +USAGE: + duf [OPTIONS] [path] + +ARGS: + Path to a root directory for serving files [default: .] + +OPTIONS: + -a, --auth Use HTTP authentication for all operations + -A, --allow-all Allow all operations + --allow-delete Allow delete operation + --allow-symlink Allow symlink to directories/files outside root directory + --allow-upload Allow upload operation + -b, --bind
Specify bind address [default: 127.0.0.1] + --cors Enable CORS, sets `Access-Control-Allow-Origin: *` + -h, --help Print help information + --no-auth-read Do not authenticate read operations like static serving + -p, --port Specify port to listen on [default: 5000] + --path-prefix Specify an url path prefix + --render-index Render index.html when requesting a directory + --render-spa Render for single-page application + --tls-cert Path to an SSL/TLS certificate to serve with HTTPS + --tls-key Path to the SSL/TLS certificate's private key + -V, --version Print version information +``` + + +## API Download a file ```