Crates.io | tide-serve |
lib.rs | tide-serve |
version | 0.0.11 |
source | src |
created_at | 2020-09-05 05:48:10.693182 |
updated_at | 2021-05-18 17:03:20.106639 |
description | a simple http file server binary based on tide |
homepage | |
repository | https://github.com/jbr/tide-serve |
max_upload_size | |
id | 284955 |
size | 78,403 |
$ cargo install tide-serve
$ tide-serve --help
tide-serve 0.0.4
a simple static http server built with tide
USAGE:
tide-serve [OPTIONS] [root]
FLAGS:
-h, --help
Prints help information
-V, --version
Prints version information
OPTIONS:
-o, --host <host>
Local host or ip to listen on [env: HOST=] [default: localhost]
-p, --port <port>
Local port to listen on [env: PORT=] [default: 8080]
-b, --bind <bind>
Local listener spec to bind
Examples: `--bind localhost:8080` `--bind http://localhost:8080` `--bind [::1]:1213`
On unix-like systems only: `--bind http+unix:///var/run/some.socket` `--bind http+unix://./tmp/socket`
--bind will override --host and --port. [env: TIDE_BIND=]
-c, --cert-path <cert-path>
Path to a tls certificate for tide_rustls
This will be ignored unless key_path is also provided. providing both key_path and cert_path enables tls.
Example: `--cert ./cert.pem --key ./key.pem` For development, try using mkcert [env: CERT_PATH=]
-k, --key-path <key-path>
The path to a tls key file for tide_rustls
This will be ignored unless cert_path is also provided. providing both key_path and cert_path enables tls.
Example: `--cert ./cert.pem --key ./key.pem` For development, try using mkcert [env: KEY_PATH=]
-f, --forward <forward>
Host to forward (reverse proxy) not-found requests to
This forwards any request that would otherwise be a 404 Not Found to the specified listener spec.
Examples: `--forward localhost:8081` `--forward http://localhost:8081` `--forward https://localhost:8081`
Note: http+unix:// schemes are not yet supported [env: FORWARD=]
ARGS:
<root>
Filesystem path to serve
Defaults to the current working directory
This crate uses #![forbid(unsafe_code)]
to ensure everything is implemented in
100% Safe Rust.