| Crates.io | jelly-fish |
| lib.rs | jelly-fish |
| version | 1.1.0 |
| created_at | 2025-09-09 00:34:01.669986+00 |
| updated_at | 2025-09-12 00:40:58.473892+00 |
| description | A lightweight static resource server built with axum. |
| homepage | |
| repository | https://github.com/canmi21/jellyfish |
| max_upload_size | |
| id | 1830099 |
| size | 200,449 |
A lightweight static resource server built with Axum.
index.html for non-existent routes.?info for file metadata and ?list for directory listings.404.html if available, with a fallback default.Clone the repository:
git clone https://github.com/canmi21/jellyfish.git
cd jellyfish
Build and run:
cargo build --release
cargo run --release
Configure environment variables (optional, see .env.example):
cp .env.example .env
nano .env
Build the Docker image:
docker build -t canmi/jellyfish .
Run with Docker Compose:
docker-compose up -d
The server is configured via environment variables. See .env.example for defaults:
LOG_LEVEL: Logging level (debug, info, warn, error). Default: info.BIND_PORT: Port to bind the server. Default: 33433.PUBLIC_DIR: Directory to serve static files from (supports ~ for home directory). Default: ~/jellyfish/public.INDEX_ROUTER_MODE: SPA mode (true/false). If true, non-existent routes fallback to index.html. Default: false.Example .env:
LOG_LEVEL=info
BIND_PORT=33433
PUBLIC_DIR=~/jellyfish/public
INDEX_ROUTER_MODE=false
http://localhost:33433 in your browser.?info to a file path (e.g., http://localhost:33433/file.txt?info) to get metadata like size, modification time, and XXH64 hash.?list to a directory path (e.g., http://localhost:33433/folder/?list) to list directory contents.INDEX_ROUTER_MODE=true to serve index.html for all non-existent routes, ideal for single-page applications.jellyfish/
├── index/ # Default index.html and 404.html templates
├── public/ # Static files to serve
├── src/ # Source code
│ ├── config.rs # Configuration loading and setup
│ ├── handler.rs # Request handling logic
│ ├── main.rs # Application entry point
│ ├── response.rs # Response formatting utilities
│ ├── server.rs # Axum router setup
│ └── shutdown.rs # Graceful shutdown handling
├── .env.example # Example environment configuration
├── Cargo.toml # Rust dependencies and metadata
├── docker-compose.yml # Docker Compose configuration
├── Dockerfile # Docker build instructions
└── README.md # This file
To contribute or modify the project:
src/.cargo run
This project is licensed under the MIT License. See the LICENSE file for details.