Minimal and blazing-fast file server. For real, this time.

Overview

Zy

Minimal and blazing-fast file server. For real, this time.

Features

Installation

To install zy, you need Rust 1.59.0 or higher. You can then use cargo to build everything:

cargo install zy

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

git clone https://github.com/miraclx/zy.git
cargo install --path zy

Usage

zy

This will start serving your current directory on http://localhost:3000 by default.

...you can also specify a different port or base directory:

zy /path/to/serve

...or perhaps different addresses:

zy -l 5000 -l 127.0.0.1:8080 -l 192.168.1.25

Configuration

You can run zy --help to see all available options.

$ zy --help
Zy 0.1.4
Minimal and blazing-fast file server.

USAGE:
    zy [OPTIONS] [DIR]

ARGS:
    <DIR>    Directory to serve [default: .]

OPTIONS:
    -l, --listen <URI>    Sets the address to listen on (repeatable) [default: 127.0.0.1:3000]
                          Valid: `3000`, `127.0.0.1`, `127.0.0.1:3000` [env: PORT]
    -s, --spa             Run as a Single Page Application
    -i, --index <FILE>    Index file to serve from the base directory [default: index.html]
        --404 <FILE>      404 file to serve from the base directory [default: 404.html]
    -c, --cache <TIME>    Cache time (max-age) [default: 1h]
                          Valid: `10` for 10 seconds, `1h`, `1year 6months`
        --no-cors         Disable Cross-Origin Resource Sharing (CORS)
    -a, --all             Serve hidden files
    -f, --follow-links    Follow symlinks outside of the base directory (unsafe)
    -v, --verbose         Be verbose
    -x, --confirm-exit    Require confirmation before exiting on Ctrl+C
    -Z, --anonymize       Hide the `Server` and `X-Powered-By` headers [alias: `--anon`]
    -h, --help            Print help information
    -V, --version         Print version information

The PORT environment variable is also supported.

Credits

Zy was originally inspired by sfz, serve and http-server. It is written in Rust and uses actix as the web framework.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as below, without any additional terms or conditions.

License

Licensed under either of

at your option.

You might also like...
Real-time CLI level meter built in Rust.
Real-time CLI level meter built in Rust.

Meter This is a very simple command line utility written in Rust for measuring the gain of a microphone. It displays the values in dBFS. This is usefu

An experimental real-time operating system (RTOS) written in Rust

An experimental real-time operating system (RTOS) written in Rust

Real-time stock tickers from the command-line. Written in Rust.

ticker-rs Real-time stock tickers from the command-line written in Rust. CLI tool using the Yahoo Finance API as a data source. It features colored ou

Display near-real-time satellite imagery on your desktop.
Display near-real-time satellite imagery on your desktop.

Satpaper Display near-real-time satellite imagery on your desktop. (Click to see full-size version) Satpaper generates live wallpapers for your deskto

Kiomet.com real-time strategy game
Kiomet.com real-time strategy game

Kiomet.com Kiomet.com is an online multiplayer real-time strategy game. Command your forces wisely and prepare for intense battles! Build Instructions

A universal load testing framework for Rust, with real-time tui support.
A universal load testing framework for Rust, with real-time tui support.

rlt A Rust Load Testing framework with real-time tui support. rlt provides a simple way to create load test tools in Rust. It is designed to be a univ

Blazing-fast and yet Sleuth cameraman to www*  😎⚑✨
Blazing-fast and yet Sleuth cameraman to www* 😎⚑✨

Haylxon πŸ”₯ πŸ¦€ SHOOT BEFORE THE BLINK || Haylxon, A tool embodying the K1SS philosophy that allows you to take screenshots of webpages/URLs at lightnin

πŸš€ Blazing fast and Powerful Discord Token Grabber, no popo made with python

Rusty-Grabber πŸš€ a blazing fast Discord Token Grabber, no popo made with python Fastest Token Grabber ever : Rusty-Grabber time ./target/release/grab

zoxide is a blazing fast replacement for your cd command
zoxide is a blazing fast replacement for your cd command

zoxide A smarter cd command for your terminal zoxide is a blazing fast replacement for your cd command, inspired by z and z.lua. It keeps track of the

Comments
  • chore: version to v0.2.0

    chore: version to v0.2.0

    Notable changes:

    Tagged: https://github.com/miraclx/zy/releases/tag/v0.2.0

    • Support for the PORT environment variable.
    • Human cache time input (e.g. 1h, 1year 6months).
    • --anonymize flag to hide the Server and X-Powered-By headers.
    • Added zstd compression support.
    • Dynamic cache control (ETag, Last-Modified, Cache-Control).
    • Auto-served index.html files.
    • Use println over tracing for trivial logs.

    Check here for a full changelog: https://github.com/miraclx/zy/compare/v0.1.1...v0.2.0

    opened by miraclx 0
  • add CI release workflow

    add CI release workflow

    Introduces a CI workflow that automates GitHub releases as well as publishing to crates.io.

    How to update versions

    • Submit a PR that bumps the version of the Cargo.toml file.
    • Ensure the Cargo.lock file is also updated.
    • Move all entries under the Unreleased section of the CHANGELOG.md file to a versioned section.
    • Once the PR is merged, the release happens!

    How it works

    Unlike most workflows, this doesn't trigger on a tag push. Instead, the first job in the workflow checks for a version bump to the Cargo.toml file when merged to master.

    Alternatively, it can be triggered right from the GitHub Actions page, due to the workflow_dispatch event. Requiring you to specify a version. This flow, however, only releases to GitHub. And not to crates.io.

    If a version bump was detected, and the new version hasn't yet been published, it spawns a job to publish it to crates.io. And if the version hasn't been released to GitHub, it spawns another job to release it.

    The release job builds binaries for 12 targets, and publishes each one as an archive.

    The final part of the release process is generation of release notes, embedding the latest changelog, including linking to the crate, as well as a credit line to the contributors of the release. Also marking it a pre-release, if it is one.

    Now for some cases

    • If the version has already been published to crates.io and released to GitHub

      CleanShot 2022-11-06 at 03 07 35@2x
    • Publishing a new version and releasing it to GitHub

      CleanShot 2022-11-06 at 03 08 43@2x
    • The final release page

      CleanShot 2022-11-06 at 04 13 21@2x
    • Final release page for a prerelease

    CleanShot 2022-11-06 at 08 28 33@2x
    opened by miraclx 0
  • rename to zy

    rename to zy

    Zy - Minimal and blazing-fast file server. For real, this time.

    $ zy --help
    Zy 0.1.0
    Minimal and blazing-fast file server.
    
    USAGE:
        zy [OPTIONS] [DIR]
    
    ARGS:
        <DIR>    Directory to serve [default: .]
    
    OPTIONS:
        -l, --listen <URI>    Sets the address to listen on (repeatable)
                              Valid: `3000`, `127.0.0.1`, `127.0.0.1:3000` [default: 127.0.0.1:3000]
        -s, --spa             Run as a Single Page Application
        -i, --index <FILE>    Index file to serve from the base directory [default: index.html]
            --404 <FILE>      404 file to serve from the base directory [default: 404.html]
        -c, --cache <SECS>    Cache time (max-age) in seconds [default: 3600]
            --no-cors         Disable Cross-Origin Resource Sharing (CORS)
        -a, --all             Serve hidden files
        -f, --follow-links    Follow symlinks outside of the base directory (unsafe)
        -v, --verbose         Be verbose
        -x, --confirm-exit    Require confirmation before exiting on Ctrl+C
        -h, --help            Print help information
        -V, --version         Print version information
    
    opened by miraclx 0
Releases(v0.2.0)
Owner
Miraculous Owonubi
./reality: SIGSEGV, Segmentation fault (core dumped)
Miraculous Owonubi
Minimal, blazing fast Node.js script runner

nrr Minimal, blazing fast Node.js script runner. Why? nrr initializes and resolves scripts way faster than package managers. It achieves this by provi

Ryan Cao 3 Nov 17, 2023
Blaze is a Rust script that continuously monitors server resource usage and sends real-time summaries and alerts to a Discord channel via Webhook.

Blaze Blaze is a Rust script designed to run 24/7 on a server, providing a summary of resource usage every 30 minutes (configurable) to a Discord chan

ShadowArcanist 18 Sep 23, 2024
A blazing fast and easy to use TRPC-like server for Rust.

rspc ?? Work in progress ?? A blazing fast and easy to use TRPC-like server for Rust. Website Example You define a trpc router and attach resolvers to

Oscar Beaumont 344 Dec 31, 2022
⚑️ Blazing fast terminal file manager written in Rust, based on async I/O.

Yazi - ⚑️ Blazing Fast Terminal File Manager Yazi ("duck" in Chinese) is a terminal file manager written in Rust, based on non-blocking async I/O. It

δΈ‰ε’²ι›… Β· Misaki Masa 189 Aug 1, 2023
A minimal file exchange server designed for clients with browsers only.

XIAO-Files Xiao-Files is a minimal file exchange server designed for clients with browsers only. Example Let's say we have a host with IP 10.8.20.1, a

EvianZhang 3 Apr 2, 2024
A hackable, minimal, fast TUI file explorer, stealing ideas from nnn and fzf.

xplr A hackable, minimal, fast TUI file explorer, stealing ideas from nnn and fzf. [Quickstart] [Features] [Plugins] [Documentation] [Upgrade Guide] [

Arijit Basu 2.6k Jan 1, 2023
πŸ›‘οΈ Terminal-based, real-time traffic monitoring and statistics for your AdGuard Home instance

AdGuardian-Term Terminal-based, real-time traffic monitoring and statistics for your AdGuard Home instance About AdGuardian Terminal Eddition - Keep a

Alicia Sykes 629 Jun 14, 2023
Revolutionize handheld gaming with adaptive game settings. Optimize graphics and gameplay experience based on real-time system metrics. Open-source project empowering developers to enhance games on portable devices

Welcome to the server-side application for the HarmonyLink project. This innovative software is developed with the Rust programming language and is ai

Jordon Brooks 5 Jun 28, 2023
Rust File Management CLI is a command-line tool written in Rust that provides essential file management functionalities. Whether you're working with files or directories, this tool simplifies common file operations with ease.

Rust FileOps Rust File Management CLI is a command-line tool written in Rust that provides essential file management functionalities. Whether you're w

Harikesh Ranjan Sinha 5 May 2, 2024
Display ZFS datasets' I/O in real time

ztop Display ZFS datasets' I/O in real time Overview ztop is like top, but for ZFS datasets. It displays the real-time activity for datasets. The buil

Alan Somers 40 Nov 23, 2022