Skip to content

Commit eec8c36

Browse files
authored
Merge pull request #715 from wayiam/master
Used table format for README summary of Commands.
2 parents a93a340 + 7bd98e8 commit eec8c36

File tree

1 file changed

+26
-47
lines changed

1 file changed

+26
-47
lines changed

README.md

Lines changed: 26 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -42,53 +42,32 @@ Using `npx` you can run the script without installing it first:
4242

4343
## Available Options:
4444

45-
`-p` or `--port` Port to use (defaults to 8080). Use `-p 0` to look for an open port, starting at 8080. It will also read from `process.env.PORT`.
46-
47-
`-a` Address to use (defaults to 0.0.0.0)
48-
49-
`-d` Show directory listings (defaults to `true`)
50-
51-
`-i` Display autoIndex (defaults to `true`)
52-
53-
`-g` or `--gzip` When enabled (defaults to `false`) it will serve `./public/some-file.js.gz` in place of `./public/some-file.js` when a gzipped version of the file exists and the request accepts gzip encoding. If brotli is also enabled, it will try to serve brotli first.
54-
55-
`-b` or `--brotli` When enabled (defaults to `false`) it will serve `./public/some-file.js.br` in place of `./public/some-file.js` when a brotli compressed version of the file exists and the request accepts `br` encoding. If gzip is also enabled, it will try to serve brotli first.
56-
57-
`-e` or `--ext` Default file extension if none supplied (defaults to `html`)
58-
59-
`-s` or `--silent` Suppress log messages from output
60-
61-
`--cors` Enable CORS via the `Access-Control-Allow-Origin` header
62-
63-
`-o [path]` Open browser window after starting the server. Optionally provide a URL path to open. e.g.: -o /other/dir/
64-
65-
`-c` Set cache time (in seconds) for cache-control max-age header, e.g. `-c10` for 10 seconds (defaults to `3600`). To disable caching, use `-c-1`.
66-
67-
`-U` or `--utc` Use UTC time format in log messages.
68-
69-
`--log-ip` Enable logging of the client's IP address (default: `false`).
70-
71-
`-P` or `--proxy` Proxies all requests which can't be resolved locally to the given url. e.g.: -P http://someurl.com
72-
73-
`--username` Username for basic authentication [none]
74-
75-
`--password` Password for basic authentication [none]
76-
77-
`-S` or `--ssl` Enable https.
78-
79-
`-C` or `--cert` Path to ssl cert file (default: `cert.pem`).
80-
81-
`-K` or `--key` Path to ssl key file (default: `key.pem`).
82-
83-
`-r` or `--robots` Provide a /robots.txt (whose content defaults to `User-agent: *\nDisallow: /`)
84-
85-
`--no-dotfiles` Do not show dotfiles
86-
87-
`--mimetypes` Path to a .types file for custom mimetype definition
88-
89-
`-h` or `--help` Print this list and exit.
90-
91-
`-v` or `--version` Print the version and exit.
45+
| Command | Description | Defaults |
46+
| ------------- |-------------|-------------|
47+
|`-p` or `--port` |Port to use. Use `-p 0` to look for an open port, starting at 8080. It will also read from `process.env.PORT`. |8080 |
48+
|`-a` |Address to use |0.0.0.0|
49+
|`-d` |Show directory listings |`true` |
50+
|`-i` | Display autoIndex | `true` |
51+
|`-g` or `--gzip` |When enabled it will serve `./public/some-file.js.gz` in place of `./public/some-file.js` when a gzipped version of the file exists and the request accepts gzip encoding. If brotli is also enabled, it will try to serve brotli first.|`false`|
52+
|`-b` or `--brotli`|When enabled it will serve `./public/some-file.js.br` in place of `./public/some-file.js` when a brotli compressed version of the file exists and the request accepts `br` encoding. If gzip is also enabled, it will try to serve brotli first. |`false`|
53+
|`-e` or `--ext` |Default file extension if none supplied |`html` |
54+
|`-s` or `--silent` |Suppress log messages from output | |
55+
|`--cors` |Enable CORS via the `Access-Control-Allow-Origin` header | |
56+
|`-o [path]` |Open browser window after starting the server. Optionally provide a URL path to open. e.g.: -o /other/dir/ | |
57+
|`-c` |Set cache time (in seconds) for cache-control max-age header, e.g. `-c10` for 10 seconds. To disable caching, use `-c-1`.|`3600` |
58+
|`-U` or `--utc` |Use UTC time format in log messages.| |
59+
|`--log-ip` |Enable logging of the client's IP address |`false` |
60+
|`-P` or `--proxy` |Proxies all requests which can't be resolved locally to the given url. e.g.: -P http://someurl.com | |
61+
|`--username` |Username for basic authentication | |
62+
|`--password` |Password for basic authentication | |
63+
|`-S` or `--ssl` |Enable https.| |
64+
|`-C` or `--cert` |Path to ssl cert file |`cert.pem` |
65+
|`-K` or `--key` |Path to ssl key file |`key.pem` |
66+
|`-r` or `--robots` | Automatically provide a /robots.txt (The content of which defaults to `User-agent: *\nDisallow: /`) | `false` |
67+
|`--no-dotfiles` |Do not show dotfiles| |
68+
|`--mimetypes` |Path to a .types file for custom mimetype definition| |
69+
|`-h` or `--help` |Print this list and exit. | |
70+
|`-v` or `--version`|Print the version and exit. | |
9271

9372
## Magic Files
9473

0 commit comments

Comments
 (0)