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
| Long | Short | Description |
|---|---|---|
| --version | -V | Show version and license |
| --port | -p | Port to listen on (default 8080) |
| --dir | -d | Directory to serve (default .) |
| --cors | -c | Enable CORS headers |
| --quiet | -q | Suppress 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
Downloads
Verify integrity
SHA256 checksums