Skip to content

stree

Rustv0.1.0MIT

A zero-configuration static file server that serves a directory over HTTP. Perfect for local development, sharing files on a LAN, or previewing static sites. Sets correct MIME types based on file extensions, supports CORS headers, and shows a directory listing for the root. Single binary, no configuration files needed.

HTTPServerDevelopmentCLI

Features

  • Serves static files with correct MIME types
  • CORS header support for cross-origin requests
  • Custom port and directory configuration
  • Directory listing for root path
  • Single binary, no config files needed

Flags

LongShortDescription
--version-VShow version and license
--port-pPort to listen on (default 8080)
--dir-dDirectory to serve (default .)
--cors-cEnable CORS headers
--quiet-qSuppress request logging

Usage

terminal
$ stree
$
$ stree --port 3000 --dir ./public
$
$ stree --port 8080 --cors

Dependencies

Zero external dependencies -- uses std::net, std::fs, std::thread

Install
$ curl -LO https://labs.stech-sol.com/downloads/stree/0.1.0/stree_linux_amd64
$ chmod +x stree_linux_amd64
$ sudo mv stree_linux_amd64 /usr/local/bin/stree
About
Language
Rust
Versionv0.1.0
LicenseMIT
RepositoryGitHub