一个简单的静态文件服务命令行工具,使用 Rust 编写。
Thank you for using this tool so far. Unfortunately I have no time maintaining it, but I believe people can find a better alternative out there on crates.io.
If you are still interested in supporting Rust and its community, please consider sponsoring Rust developers you like. You can find a few from the official Rust teams, or just buy me a coffee ❤️.
sfz, or Static File Zerver, is a simple command-line tool serving static files for you.
The name sfz is derived from an accented note Sforzando in music, which means “suddenly with force.”
index.html.gitignore fileIf you are a macOS Homebrew user, you can install sfz from a custom tap:
brew tap weihanglo/sfz https://github.com/weihanglo/sfz.git
brew install sfzDisclaimer: Formula on Linuxbrew did not fully tested.
If you are a Rust programmer, sfz are available on crates.io via Cargo.
cargo install sfzYou can also install the latest version (or a specific commit) of sfz directly from GitHub.
cargo install --git https://github.com/weihanglo/sfz.gitArchives of prebuilt binaries are available on GitHub Release for Linux, maxOS and Windows. Download a compatible binary for your system. For convenience, make sure you place sfz under $PATH if you want access it from the command line.
sfz is written in Rust. You need to install Rust in order to compile it.
$ git clone https://github.com/weihanglo/sfz.git
$ cd sfz
$ cargo build --release
$ ./target/release/sfz --version
0.7.1The simplest way to start serving files is to run this command:
sfz [FLAGS] [OPTIONS] [path]The command above will start serving your current working directory on 127.0.0.1:5000 by default.
If you want to serve another directory, pass [path] positional argument in with either absolute or relaitve path.
sfz /usr/local
# Serve files under `/usr/local` directory.
#
# You can press ctrl-c to exit immediately.sfz aims to be simple but configurable. Here is a list of available options:
…Contributions are highly appreciated! Feel free to open issues or send pull requests directly.
sfz was originally inspired by another static serving tool serve, and sfz's directory-listing UI is mainly borrowed from GitHub.
sfz is built on the top of awesome Rust community. Thanks for all Rust and crates contributors.
This project is licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in sfz by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
暂无开放 Issues,或尚未同步最近议题。