webdir

Crates.iowebdir
lib.rswebdir
version0.1.2
sourcesrc
created_at2023-04-01 19:19:12.296307
updated_at2023-04-01 19:53:22.47583
descriptionA simple HTTP web server to serve directory
homepage
repositoryhttps://github.com/OdinSrc/webdir.git
max_upload_size
id827467
size115,412
(OdinSrc)

documentation

README

webdir

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.

Features

  • Serves files from a specified directory
  • Customizable port number and bind address

Installation

You can install webdir using Cargo, the Rust package manager:

cargo install webdir

Usage

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

Why webdir?

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.

Contributing

If you find any issues or have any suggestions for improvements, feel free to open an issue or submit a pull request.

Commit count: 6

cargo fmt