All Projects → weihanglo → Sfz

weihanglo / Sfz

Licence: other
A simple static file serving command-line tool written in Rust.

Programming Languages

rust
11053 projects

Labels

Projects that are alternatives of or similar to Sfz

Qov
The terminal presentation tool.
Stars: ✭ 141 (-2.76%)
Mutual labels:  cli
Python Cfonts
Sexy fonts for the console
Stars: ✭ 143 (-1.38%)
Mutual labels:  cli
Osm
🚚 ☁️ Object Store Manipulator - curl for cloud storage
Stars: ✭ 144 (-0.69%)
Mutual labels:  cli
Wikit
Wikipedia summaries from the command line
Stars: ✭ 141 (-2.76%)
Mutual labels:  cli
Cli Menu
🖥 Build beautiful PHP CLI menus. Simple yet Powerful. Expressive DSL.
Stars: ✭ 1,776 (+1124.83%)
Mutual labels:  cli
Javali
🐗 Create a modern JavaScript library that uses ES6 + Jest
Stars: ✭ 144 (-0.69%)
Mutual labels:  cli
Node Promptly
Simple command line prompting utility for nodejs
Stars: ✭ 140 (-3.45%)
Mutual labels:  cli
Handwrite
Handwrite generates a custom font based on your handwriting sample.
Stars: ✭ 145 (+0%)
Mutual labels:  cli
Gf Cli
GoFrame Command Line Interface, which is your helpmate for building GoFrame application with convenience.
Stars: ✭ 143 (-1.38%)
Mutual labels:  cli
Micro Starter
[Deprecated] 🔷 Basic (opinionated) starter kit for a micro app with webpack build
Stars: ✭ 144 (-0.69%)
Mutual labels:  cli
Swiftplate
Easily generate cross platform Swift framework projects from the command line
Stars: ✭ 1,746 (+1104.14%)
Mutual labels:  cli
Swift For Scripting
📋A hand-curated collection of useful and informative Swift Scripting materials.
Stars: ✭ 142 (-2.07%)
Mutual labels:  cli
Aptos
☀️ A tool for validating data using JSON Schema and converting JSON Schema documents into different data-interchange formats
Stars: ✭ 144 (-0.69%)
Mutual labels:  cli
My Token
📈Track token prices of your favorite exchanges in terminal!
Stars: ✭ 141 (-2.76%)
Mutual labels:  cli
Strest
⚡️ CI-ready tests for REST APIs configured in YAML
Stars: ✭ 1,746 (+1104.14%)
Mutual labels:  cli
Yacspin
Yet Another CLi Spinner; providing over 70 easy to use and customizable terminal spinners for multiple OSes
Stars: ✭ 139 (-4.14%)
Mutual labels:  cli
Vcd Cli
Command Line Interface for VMware vCloud Director
Stars: ✭ 143 (-1.38%)
Mutual labels:  cli
Protolint
A pluggable linter and fixer to enforce Protocol Buffer style and conventions.
Stars: ✭ 142 (-2.07%)
Mutual labels:  cli
Xcv
✂️ Cut, Copy and Paste files with Bash
Stars: ✭ 144 (-0.69%)
Mutual labels:  cli
Gotime
CUI project/task/time tracker written in golang
Stars: ✭ 144 (-0.69%)
Mutual labels:  cli

sfz

Crates.io Build Status Code Coverage Lines of Code Dependency Status

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.”

Features

  • Directory listing
  • Partial responses (range requests)
  • Conditional requests with cache validations
  • Cross-origin resource sharing
  • Automatic HTTP compression (Brotli, Gzip, Deflate)
  • Automatic rendering index.html
  • Respect .gitignore file
  • Customize path prefix

Installation

Automatic

macOS

If 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 sfz

Disclaimer: Formula on Linuxbrew did not fully tested.

Cargo

If you are a Rust programmer, sfz are available on crates.io via Cargo.

cargo install sfz

You can also install the latest version (or a specific commit) of sfz directly from GitHub.

cargo install --git https://github.com/weihanglo/sfz.git

Manual

Prebuilt binaries

Archives 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.

Build from source

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.4.0

Usage

The 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.

Flags and Options

sfz aims to be simple but configurable. Here is a list of available options:

USAGE:
    sfz [FLAGS] [OPTIONS] [path]

FLAGS:
    -a, --all             Serve hidden and dot (.) files
    -C, --cors            Enable Cross-Origin Resource Sharing from any origin (*)
    -L, --follow-links    Follow symlinks outside current serving base path
    -h, --help            Prints help information
    -I, --no-ignore       Don't respect gitignore file
        --no-log          Don't log any request/response information.
    -r, --render-index    Render existing index.html when requesting a directory.
    -Z, --unzipped        Disable HTTP compression
    -V, --version         Prints version information

OPTIONS:
    -b, --bind <address>        Specify bind address [default: 127.0.0.1]
    -c, --cache <seconds>       Specify max-age of HTTP caching in seconds [default: 0]
        --path-prefix <path>    Specify an url path prefix, helpful when running behing a reverse proxy
    -p, --port <port>           Specify port to listen on [default: 5000]

ARGS:
    <path>    Path to a directory for serving files [default: .]

Contributing

Contributions are highly appreciated! Feel free to open issues or send pull requests directly.

Credits

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.

License

This project is licensed under either of

at your option.

Contribution

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].