Crates.io | http-serve-folder |
lib.rs | http-serve-folder |
version | 0.2.0 |
source | src |
created_at | 2022-06-23 23:17:19.546241 |
updated_at | 2023-12-13 00:43:40.448296 |
description | A configurable HTTP server that hosts a folder. Suitable for local testing. |
homepage | |
repository | https://github.com/paul-hansen/http-serve-folder |
max_upload_size | |
id | 612117 |
size | 53,522 |
A command line configurable, single executable server for hosting a folder over HTTP. Only intended for use in local development/testing.
I created this because no minimal servers I found supported setting custom response headers, and I needed to be able to test locally while using SharedArrayBuffer which requires certain headers to be set.
You can download the latest version from the Releases page under "Assets".
Or if you have Rust installed, you can compile and install it using:
cargo install http-serve-folder
To see the instructions, use the -h
flag:
http-serve-folder -h
Which outputs:
A configurable HTTP server that hosts a folder. Suitable for local
testing.
Usage: http-serve-folder [OPTIONS] [DIR]
Arguments:
[DIR] The folder you want to host
Options:
-H, --header <HEADERS> Headers to add to all file responses
-i, --ip_address <IP_ADDRESS> The IP Address to bind to [default: 127.0.0.1]
-p, --port <PORT> The port number to bind to [default: 4040]
-l, --log <LOG> The level of logging to display [default: info] [possible values: debug, info, warn, error, off]
-h, --help Print help (see more with '--help')
-V, --version Print version
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.