| Crates.io | static-file-http-server |
| lib.rs | static-file-http-server |
| version | 0.1.15 |
| created_at | 2023-02-18 12:28:07.985161+00 |
| updated_at | 2023-02-19 12:45:49.112141+00 |
| description | A simple and zero-configuration command-line http server for static file hosting |
| homepage | |
| repository | https://github.com/devraymondsh/static-file-http-server |
| max_upload_size | |
| id | 788174 |
| size | 56,732 |
npm install --global static-file-http-server
cargo install static-file-http-server
static-file-http-server [OPTIONS] <PATH>
| Option(short) | Option(long) | Description | Default |
|---|---|---|---|
| -a | --addr | Address to bind, for example: 0.0.0.0:80. You may need administrator permissions for binding on port 80 based on your OS. | 127.0.0.1:8085 |
| -r | --cors | Controling CORS via the 'Access-Control-Allow-Origin' header. | * |
| -c | --cache | Set cache time (in seconds) for cache-control max-age header, for eaxmple: -c10 for 10 seconds. Use -c-1 to disable caching. | 3600 |
| -o | --open | Open the browser after starting the server. | |
| -p | --single-binary | Produce a single binary that serves files that get embedded in the binary for better performance. You need to install Rust and Cargo before running this feature. (Recommend ed for production). | |
| -h | --help | Print help. | |
| -V | --version | Print version. |