A dead-simple multi-threaded web and file server.
Go to file
Johannes Wünsche 100fea5c72 fix webserve flag action 2023-02-05 20:17:09 +01:00
data Add icon 2021-02-26 19:15:28 +01:00
src fix webserve flag action 2023-02-05 20:17:09 +01:00
tests update clap 2023-01-28 23:30:38 +01:00
.gitignore Add file server test 2021-03-05 15:51:25 +01:00
Cargo.lock update walkdir 2023-01-28 23:35:52 +01:00
Cargo.toml update walkdir 2023-01-28 23:35:52 +01:00
Dockerfile update CLI usage Dockerfile 2023-02-03 19:22:07 +01:00
README.md Fix image link for new gitea version 2021-06-27 15:54:22 +02:00

README.md

rusty-conveyor - a simple multi-threaded web and file server

A no config static binary to host web and file server via http

Build

No prebuilt binaries are provided at the moment. To use the application you'll have to build it yourself. For this you'll need a configured Rust toolchain. Check out the page rust-lang page for a quick setup.

When you have everything setup, clone the repository and use cargo to build the repository.

$ git clone https://git.spacesnek.rocks/johannes/rusty-conveyor.git
$ cd rusty-conveyor
$ # Build for the release target
$ # this will drastically decrease the size of the resulting binaries
$ cargo build --release

Usage with Container Environments

A Dockerfile is given that produces a container able to mount files to /data with a single statically linked binary. The default mode for the container is the web mode automatically indexing to index.html files on directories. You can then mount your files to /data like this:

$ # Use any compatible container client you want e.g. docker, podman ...
$ podman -v ./your-files:/data -p 7331:7331 rusty-conveyor

Usage

$ ./rusty-conveyor --help
rusty-conveyor 0.1
Johannes Wünsche <johannes@spacesnek.rocks>
A dead simple multi-threaded web and file server via http.

USAGE:
    rusty-conveyor [FLAGS] [OPTIONS]

FLAGS:
    -h, --help       
            Prints help information

    -V, --version    
            Prints version information

    -w, --web        
            Serve files in style of a web server. In detail things like `index.html` can be omitted in the address to
            better serve usable for web browsers.

OPTIONS:
    -a, --address <ADDRESS>    
            The address on which the application should bind to. This can be any identifier e.g. localhost or IP
            configured. [default: 127.0.0.1]
    -d, --directory <DIR>      
            The directory in which files are served from. Any path can be, as content are held in memory to deliver fast
            response the total size of files should not be larger than available memory. [default: .]
    -p, --port <PORT>          
            The port on which the application binds to on the given address. [default: 7331]

HTTPS

For https use a reverse proxy like traefik or sozu.