| Crates.io | shrimple-localhost |
| lib.rs | shrimple-localhost |
| version | 5.2.0 |
| created_at | 2024-04-28 20:02:24.004067+00 |
| updated_at | 2024-09-21 16:41:22.608834+00 |
| description | Zero-dependency localhost server, usable both in the terminal and in your Rust code |
| homepage | |
| repository | https://github.com/schvv31n/shrimple-localhost |
| max_upload_size | |
| id | 1223512 |
| size | 44,375 |
serve_current_dir()Host your local files, e.g. for inspection by tools such as your trusty browser:
Need it as a CLI?
cargo install shrimple-localhost
Need it as a library?
cargo add shrimple-localhost
Without any options, shrimple-localhost defaults to hosting the files in the current directory at the default port
shrimple-localhost
-r flag followed by the path to the root-p flag followed by the port numbershrimple-localhost -p 4096 -r ~/website/static
More on this in the docs of the library: https://docs.rs/shrimple-localhost
The server to be made lightweight, thus it's very barebones; it can only handle 1 connection at once, which should be enough for what's merely a development tool.