Crates.io | webdir |
lib.rs | webdir |
version | 0.1.2 |
source | src |
created_at | 2023-04-01 19:19:12.296307 |
updated_at | 2023-04-01 19:53:22.47583 |
description | A simple HTTP web server to serve directory |
homepage | |
repository | https://github.com/OdinSrc/webdir.git |
max_upload_size | |
id | 827467 |
size | 115,412 |
webdir
is a simple Rust program that serves directory files in a HTTP web server. It's designed to be similar to Python's built-in http.server
module.
You can install webdir
using Cargo, the Rust package manager:
cargo install webdir
To start the server, run the following command:
webdir
By default, the server will listen on port 8000
and bind to all available interfaces.
You can specify a custom port number using the -p
or --port
option:
webdir -p 8080
You can specify a custom bind address using the -b
or --bind
option:
webdir --bind 127.0.0.1
You can specify a custom directory to serve using the -d
or --dir
option:
webdir --dir /path/to/directory
There are other similar crates in Rust for serving directories over HTTP, but I found them to be too complex and unnecessary for simple directory serving purposes. I created webdir
for my personal use as a lightweight and easy-to-use alternative to those crates. Feel free to use it if you find it useful.
If you find any issues or have any suggestions for improvements, feel free to open an issue or submit a pull request.