{"id":13550244,"url":"https://github.com/weihanglo/sfz","last_synced_at":"2025-04-03T00:33:20.141Z","repository":{"id":43080089,"uuid":"119256258","full_name":"weihanglo/sfz","owner":"weihanglo","description":"A simple static file serving command-line tool written in Rust.","archived":true,"fork":false,"pushed_at":"2023-03-27T08:20:18.000Z","size":1017,"stargazers_count":398,"open_issues_count":0,"forks_count":30,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-05-01T14:36:09.901Z","etag":null,"topics":["cli","rust","static-server"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/sfz","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/weihanglo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-01-28T12:29:03.000Z","updated_at":"2024-04-29T22:47:06.000Z","dependencies_parsed_at":"2024-01-14T07:04:03.673Z","dependency_job_id":"55445151-52cc-44c4-9b79-370ffe88abf4","html_url":"https://github.com/weihanglo/sfz","commit_stats":{"total_commits":234,"total_committers":10,"mean_commits":23.4,"dds":0.4700854700854701,"last_synced_commit":"8b04beff55fd1b59a00a0c02c50e35be16e1db15"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weihanglo%2Fsfz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weihanglo%2Fsfz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weihanglo%2Fsfz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weihanglo%2Fsfz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weihanglo","download_url":"https://codeload.github.com/weihanglo/sfz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246916733,"owners_count":20854511,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","rust","static-server"],"created_at":"2024-08-01T12:01:30.638Z","updated_at":"2025-04-03T00:33:17.562Z","avatar_url":"https://github.com/weihanglo.png","language":"Rust","funding_links":["https://github.com/sponsors/weihanglo"],"categories":["Rust"],"sub_categories":[],"readme":"\u003e Thank you for using this tool so far. Unfortunately I have no time\n\u003e maintaining it, but I believe people can find a better alternative\n\u003e out there on [crates.io](https://crates.io).\n\u003e\n\u003e If you are still interested in supporting Rust and its community, please\n\u003e consider **sponsoring Rust developers you like**. You can find a few from\n\u003e the official [Rust teams](https://www.rust-lang.org/governance/),\n\u003e or just [buy me a coffee](https://github.com/sponsors/weihanglo) ❤️.\n\n# [![sfz](.github/sfz.svg)][sfz]\n\n[![Crates.io](https://img.shields.io/crates/v/sfz.svg)](https://crates.io/crates/sfz)\n[![Build Status](https://github.com/weihanglo/sfz/workflows/CI/badge.svg)](https://github.com/weihanglo/sfz/actions?query=workflow%3ACI)\n[![Code Coverage](https://codecov.io/gh/weihanglo/sfz/coverage.svg)](https://codecov.io/gh/weihanglo/sfz)\n[![Lines of Code](https://tokei.rs/b1/github/weihanglo/sfz?category=code)][sfz]\n[![Dependency Status](https://deps.rs/repo/github/weihanglo/sfz/status.svg)](https://deps.rs/repo/github/weihanglo/sfz)\n\nsfz, or **S**tatic **F**ile **Z**erver, is a simple command-line tool serving static files for you.\n\n![](.github/cover.png)\n\nThe name **sfz** is derived from an accented note [Sforzando][sforzando] in music, which means “suddenly with force.”\n\n[sfz]: https://github.com/weihanglo/sfz\n[sforzando]: https://en.wikipedia.org/wiki/Dynamics_(music)#Sudden_changes_and_accented_notes\n\n## Features\n\n- Directory listing\n- Partial responses (range requests)\n- Conditional requests with cache validations\n- Cross-origin resource sharing\n- Automatic HTTP compression (Brotli, Gzip, Deflate)\n- Automatic rendering `index.html`\n- Respect `.gitignore` file\n- Customize path prefix\n\n## Installation\n\n### Automatic\n\n#### macOS\n\nIf you are a **macOS Homebrew** user, you can install sfz from a custom tap:\n\n```shell\nbrew tap weihanglo/sfz https://github.com/weihanglo/sfz.git\nbrew install sfz\n```\n\n\u003e Disclaimer: Formula on **Linuxbrew** did not fully tested.\n\n#### Cargo\n\nIf you are a **Rust programmer**, sfz are available on [crates.io][crates.io] via [Cargo][cargo].\n\n```shell\ncargo install sfz\n```\n\nYou can also install the latest version (or a specific commit) of sfz directly from GitHub.\n\n```shell\ncargo install --git https://github.com/weihanglo/sfz.git\n```\n\n[crates.io]: https://crates.io\n[cargo]: https://doc.rust-lang.org/cargo/\n\n### Manual\n\n#### Prebuilt binaries\n\nArchives of prebuilt binaries are available on [GitHub Release][gh-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.\n\n[gh-release]: https://github.com/weihanglo/sfz/releases\n\n#### Build from source\n\nsfz is written in Rust. You need to [install Rust][install-rust] in order to compile it.\n\n```shell\n$ git clone https://github.com/weihanglo/sfz.git\n$ cd sfz\n$ cargo build --release\n$ ./target/release/sfz --version\n0.7.1\n```\n\n[install-rust]: https://www.rust-lang.org/install.html\n\n## Usage\n\nThe simplest way to start serving files is to run this command:\n\n```shell\nsfz [FLAGS] [OPTIONS] [path]\n```\n\nThe command above will start serving your current working directory on `127.0.0.1:5000` by default.\n\nIf you want to serve another directory, pass `[path]` positional argument in with either absolute or relaitve path.\n\n```shell\nsfz /usr/local\n\n# Serve files under `/usr/local` directory.\n# \n# You can press ctrl-c to exit immediately.\n```\n\n### Flags and Options\n\nsfz aims to be simple but configurable. Here is a list of available options:\n\n```\nUSAGE:\n    sfz [OPTIONS] [path]\n\nARGS:\n    \u003cpath\u003e    Path to a directory for serving files [default: .]\n\nOPTIONS:\n    -a, --all                   Serve hidden and dot (.) files\n    -b, --bind \u003caddress\u003e        Specify bind address [default: 127.0.0.1]\n    -c, --cache \u003cseconds\u003e       Specify max-age of HTTP caching in seconds [default: 0]\n    -C, --cors                  Enable Cross-Origin Resource Sharing from any origin (*)\n        --coi                   Enable Cross-Origin isolation\n    -h, --help                  Print help information\n    -I, --no-ignore             Don't respect gitignore file\n    -L, --follow-links          Follow symlinks outside current serving base path\n        --no-log                Don't log any request/response information.\n    -p, --port \u003cport\u003e           Specify port to listen on [default: 5000]\n        --path-prefix \u003cpath\u003e    Specify an url path prefix, helpful when running behing a reverse\n                                proxy\n    -r, --render-index          Render existing index.html when requesting a directory.\n    -V, --version               Print version information\n    -Z, --unzipped              Disable HTTP compression\n```\n\n## Contributing\n\nContributions are highly appreciated! Feel free to open issues or send pull requests directly.\n\n## Credits\n\nsfz was originally inspired by another static serving tool [serve][serve], and sfz's directory-listing UI is mainly borrowed from [GitHub][github].\n\nsfz is built on the top of awesome Rust community. Thanks for all Rust and crates contributors.\n\n[serve]: https://github.com/zeit/serve\n[github]: https://github.com/\n\n## License\n\nThis project is licensed under either of\n\n- Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n### Contribution\n\nUnless 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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweihanglo%2Fsfz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweihanglo%2Fsfz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweihanglo%2Fsfz/lists"}