Skill: flowerwrong/http-static-server (version 2026.3.10)

--- name: http-static-server description: Start an ad-hoc HTTP static file server in the current directory using one-line commands across 25+ languages and tools. Auto-detects available runtimes and recommends the best option. homepage: https://gist.github.com/willurd/5720255 {"author":"flowerwrong","version":"2026.3.10","sdk_version":"1.4.0","updated":"2026-03-10"} --- # HTTP Static Server One-Liners Start an ad-hoc HTTP static file server serving the current (or specified) directory. Default: `http://localhost:8000` Reference: <https://gist.github.com/willurd/5720255> Detailed per-language docs: `{baseDir}/references/` ## When to use this skill - User needs to quickly serve static files (HTML/CSS/JS/images) locally - User asks "how do I start a local web server" or similar - User wants to preview a static site, share files over LAN, or test frontend assets - User needs a quick HTTP server for development or testing ## Quick Reference Table | Language/Tool | Command | Dir Listing | Install Needed | |---|---|---|---| | **Python 3** | `python3 -m http.server 8000` | Yes | No | | Python 2 | `python -m SimpleHTTPServer 8000` | Yes | No | | Twisted | `twistd -n web -p 8000 --path .` | Yes | `pip install twisted` | | **Node.js (npx)** | `npx http-server -p 8000` | Yes | No | | Node.js (serve) | `npx serve -l 8000` | Yes | No | | node-static | `npx node-static -p 8000` | No | No | | **Deno** | `deno run --allow-net --allow-read jsr:@std/http/file-server` | Yes | No | | **PHP** | `php -S 127.0.0.1:8000` | No | No | | **Ruby** | `ruby -run -ehttpd . -p8000` | Yes | No | | Ruby (WEBrick) | `ruby -rwebrick -e'WEBrick::HTTPServer.new(:Port=>8000,:DocumentRoot=>Dir.pwd).start'` | Yes | No | | Ruby (adsf) | `adsf -p 8000` | No | `gem install adsf` | | Ruby (Sinatra) | `ruby -rsinatra -e'set :public_folder,".";set :port,8000'` | No | `gem install sinatra` | | **Go** | `go run github.com/goware/webify@latest -port 8000 .` | Yes | No | | **Java 18+** | `jwebserver -d . -b 0.0.0.0 -p 8000` | Yes | No | | Java (module) | `java -m jdk.httpserver -d . -b 0.0.0.0 -p 8000` | Yes | No | | **Rust** | `miniserve -p 8000 .` | Yes | `cargo install miniserve` | | Perl (Plack) | `plackup -MPlack::App::Directory -e 'Plack::App::Directory->new(root=>".");' -p 8000` | Yes | `cpan Plack` | | Perl (Brick) | `perl -MHTTP::Server::Brick -e '$s=HTTP::Server::Brick->new(port=>8000);$s->mount("/"=>{path=>"."});$s->start'` | Yes | `cpan HTTP::Server::Brick` | | Perl (Mojo) | `perl -MMojolicious::Lite -MCwd -e 'app->static->paths->[0]=getcwd;app->start' daemon -l http://*:8000` | No | `cpan Mojolicious::Lite` | | Erlang | `erl -s inets -eval 'inets:start(httpd,[...]).'` | No | No | | **Elixir** | `elixir --no-halt -e 'Application.start(:inets);:inets.start(:httpd,...)'` | No | No | | BusyBox | `busybox httpd -f -p 8000` | Yes | No | | lighttpd | `lighttpd -Df - <<< ...` | Configurable | `brew install lighttpd` | | webfs | `webfsd -F -p 8000` | Yes | `apt install webfs` | | Algernon | `algernon -x . :8000` | Yes | `brew install algernon` | | Docker (Nginx) | `docker run --rm -v "$PWD":/usr/share/nginx/html:ro -p 8000:80 nginx` | Configurable | Docker | | Docker (PHP) | `docker run -it --rm -v "$PWD":/app -w /app -p 8000:8000 php:8.2-cli php -S 0.0.0.0:8000` | No | Docker | | PowerShell (Pode) | `Start-PodeStaticServer -Port 8000 -FileBrowser -Address 0.0.0.0` | Yes | `Install-Module Pode` | | IIS Express | `iisexpress.exe /path:C:\MyWeb /port:8000` | No | Windows | ## Decision guide for the agent 1. **Detect runtimes**: Check which runtimes are available (`python3 --version`, `node --version`, `deno --version`, etc.). 2. **Default to Python 3** — pre-installed on most Linux/macOS systems. 3. **Node.js project context** — prefer `npx serve` or `npx http-server`. 4. **Deno project context** — use the `jsr:@std/http/file-server`. 5. **Minimal environment** (containers, embedded) — use `busybox httpd`. 6. **Windows without WSL** — use PowerShell (Pode) or IIS Express. 7. **Need features** (upload, auth, HTTPS) — recommend `miniserve` (Rust) or Algernon. 8. **No runtime available** — suggest Docker approach. 9. Always confirm the desired **port** (default 8000) and **directory** (default `.`). 10. For per-language details, flags, and advanced usage, see `{baseDir}/references/<language>.md`. ## Common options | Need | Solution | |---|---| | Custom port | Replace `8000` with desired port in any command | | Serve a specific directory | Append the path or use the tool's directory flag | | Bind to all interfaces (LAN) | Use `0.0.0.0` as the bind address | | CORS headers | `npx http-server --cors` or add middleware | | HTTPS | `miniserve --tls-cert/--tls-key`, reverse proxy, or `openssl s_server` | | Directory listings | Python, http-server, Plack, miniserve, BusyBox support by default | | File upload | `miniserve --upload-files` | | Authentication | `miniserve --auth user:password` | | Docker (no local runtime) | See `{baseDir}/references/docker.md` | ## Per-language reference docs Detailed documentation with full flags, install instructions, and advanced usage: - `{baseDir}/references/python.md` — Python 3, Python 2, Twisted - `{baseDir}/references/nodejs.md` — http-server, serve, node-static, inline - `{baseDir}/references/deno.md` — std/http file-server - `{baseDir}/references/php.md` — Built-in dev server, Docker - `{baseDir}/references/ruby.md` — ruby -run, WEBrick, adsf, Sinatra - `{baseDir}/references/go.md` — webify, inline Go - `{baseDir}/references/rust.md` — miniserve, http - `{baseDir}/references/java.md` — jwebserver, jdk.httpserver, inline - `{baseDir}/references/perl.md` — Plack, HTTP::Server::Brick, Mojolicious - `{baseDir}/references/erlang.md` — inets - `{baseDir}/references/elixir.md` — :inets, Plug - `{baseDir}/references/busybox.md` — busybox httpd - `{baseDir}/references/docker.md` — Nginx, PHP, Python, Alpine - `{baseDir}/references/powershell.md` — Pode, .NET HttpListener, IIS Express - `{baseDir}/references/lighttpd.md` — inline config, config file - `{baseDir}/references/webfs.md` — webfsd - `{baseDir}/references/algernon.md` — static mode, Lua scripting

path: README.md
content: # http-static-server

An [OpenClaw](https://docs.openclaw.ai/tools/skills) skill that helps AI agents (and humans) quickly start an HTTP static file server using **one-line commands** across 25+ languages and tools.

Based on the classic gist: [Big list of http static server one-liners](https://gist.github.com/willurd/5720255)

## Install

```bash
openclaw install http-static-server
```

Or manually copy `SKILL.md` and the `references/` directory into your skills folder.

## Supported Languages & Tools

| Category | Tools |
|---|---|
| **Python** | http.server (3.x), SimpleHTTPServer (2.x), Twisted |
| **JavaScript** | http-server, serve, node-static (Node.js), Deno std |
| **Ruby** | ruby -run, WEBrick, adsf, Sinatra |
| **PHP** | Built-in dev server |
| **Go** | webify |
| **Rust** | miniserve, thecoshman/http |
| **Java** | jwebserver (18+), jdk.httpserver |
| **Perl** | Plack, HTTP::Server::Brick, Mojolicious |
| **Erlang/Elixir** | inets, Plug |
| **System** | BusyBox, lighttpd, webfs, Algernon |
| **Container** | Docker (Nginx, PHP, Python, Alpine) |
| **Windows** | PowerShell (Pode), IIS Express |

## Quick Start

The most common choices:

```bash
# Python (pre-installed on most systems)
python3 -m http.server 8000

# Node.js (zero-install via npx)
npx http-server -p 8000

# Deno
deno run --allow-net --allow-read jsr:@std/http/file-server

# PHP
php -S 127.0.0.1:8000

# Ruby
ruby -run -ehttpd . -p8000

# Java 18+
jwebserver -d . -p 8000

# Docker (no local runtime needed)
docker run --rm -v "$PWD":/usr/share/nginx/html:ro -p 8000:80 nginx
```

## Project Structure

```
.
├── SKILL.md              # Main skill file (frontmatter + quick reference + agent decision guide)
├── README.md             # This file
└── references/           # Detailed per-language documentation
    ├── python.md
    ├── nodejs.md
    ├── deno.md
    ├── php.md
    ├── ruby.md
    ├── go.md
    ├── rust.md
    ├── java.md
    ├── perl.md
    ├── erlang.md
    ├── elixir.md
    ├── busybox.md
    ├── docker.md
    ├── powershell.md
    ├── lighttpd.md
    ├── webfs.md
    └── algernon.md
```

## How It Works

When an AI agent receives a request like "start a local web server", this skill:

1. Checks which runtimes are available on the user's system
2. Recommends the best option (defaults to Python 3)
3. Provides the exact one-liner command
4. Offers alternatives if the preferred runtime isn't installed

The agent can also consult the detailed `references/` docs for advanced flags, HTTPS setup, CORS configuration, and more.

## Common Options

| Need | Solution |
|---|---|
| Custom port | Replace `8000` with desired port |
| Specific directory | Append the path or use the tool's `-d`/`-t` flag |
| LAN access | Bind to `0.0.0.0` |
| CORS | `npx http-server --cors` |
| HTTPS | `miniserve --tls-cert cert.pem --tls-key key.pem` |
| File upload | `miniserve --upload-files` |
| Authentication | `miniserve --auth user:password` |

## License

Public domain. The original gist is a community-maintained collection.


path: references/go.md
content: # Go HTTP Static Server

## goware/webify

```bash
go run github.com/goware/webify@latest -port 8000 .
```

Or install first:

```bash
go install github.com/goware/webify@latest
webify -port 8000 .
```

Features:
- Directory listing: Yes
- Single binary, fast
- Requires Go installed

## Inline Go (no dependencies)

```bash
go run -e 'package main; import "net/http"; func main() { http.ListenAndServe(":8000", http.FileServer(http.Dir("."))) }'
```

Or create a file `server.go`:

```go
package main

import "net/http"

func main() {
    http.ListenAndServe(":8000", http.FileServer(http.Dir(".")))
}
```

Then:

```bash
go run server.go
```

Features:
- Directory listing: Yes
- Zero dependencies
- Production-grade performance
- Bind to all interfaces by default (`:8000`)


path: references/python.md
content: # Python HTTP Static Server

## Python 3 (recommended)

The built-in `http.server` module is the simplest and most widely available option.

```bash
python3 -m http.server 8000
```

Bind to a specific address:

```bash
python3 -m http.server 8000 --bind 127.0.0.1
```

Serve a specific directory (Python 3.7+):

```bash
python3 -m http.server 8000 --directory /path/to/dir
```

Features:
- Directory listing: Yes
- HTTPS: No (use reverse proxy)
- Pre-installed on most Linux/macOS systems
- Bind-all: `--bind 0.0.0.0`

## Python 2 (legacy)

```bash
python -m SimpleHTTPServer 8000
```

Note: Python 2 is EOL since January 2020. Use Python 3 whenever possible.

## Twisted

A more full-featured option with production-grade capabilities.

Install:

```bash
pip install twisted
```

One-liner daemon:

```bash
twistd -n web -p 8000 --path .
```

Inline script:

```bash
python -c 'from twisted.web.server import Site; from twisted.web.static import File; from twisted.internet import reactor; reactor.listenTCP(8000, Site(File("."))); reactor.run()'
```

Features:
- Directory listing: Yes
- Supports HTTPS with certificates
- Production-grade event loop
- Requires `pip install twisted`


path: references/busybox.md
content: # BusyBox HTTP Static Server

## busybox httpd

```bash
busybox httpd -f -p 8000
```

Run in background (daemonize):

```bash
busybox httpd -p 8000
```

Serve a specific directory:

```bash
busybox httpd -f -p 8000 -h /path/to/dir
```

Bind to specific address:

```bash
busybox httpd -f -p 192.168.1.100:8000
```

Features:
- Directory listing: Yes
- Extremely lightweight (embedded/IoT-friendly)
- Available on most minimal Linux distributions
- CGI support: `-c httpd.conf`
- Foreground mode: `-f`
- No dependencies beyond BusyBox

## Configuration file (optional)

Create `httpd.conf` for access control:

```
# Deny access to hidden files
D:.*

# Allow specific IP range
A:192.168.1.0/24

# Custom MIME types
.json:application/json
```

```bash
busybox httpd -f -p 8000 -c httpd.conf
```


path: references/elixir.md
content: # Elixir HTTP Static Server

## Using :inets (Elixir 1.17+)

Elixir can leverage Erlang's built-in `:inets` module:

```bash
elixir --no-halt -e '
Application.start(:inets)
:inets.start(:httpd,
  port: 8000,
  server_root: ~c".",
  document_root: ~c".",
  server_name: ~c"httpd",
  mime_types: [
    {~c"html", ~c"text/html"},
    {~c"js", ~c"text/javascript"},
    {~c"css", ~c"text/css"},
    {~c"png", ~c"image/png"},
    {~c"jpg", ~c"image/jpeg"}
  ]
)
'
```

Features:
- Directory listing: No
- No hex dependencies needed
- Uses Erlang OTP under the hood
- Requires explicit MIME type configuration

## Using Plug (with Mix project)

For a more full-featured option within a Mix project:

```elixir
# In mix.exs, add {:plug_cowboy, "~> 2.0"}
# Then:
Mix.install([:plug_cowboy])

defmodule StaticServer do
  use Plug.Router
  plug Plug.Static, at: "/", from: "."
  plug :match
  plug :dispatch
  match _ do send_resp(conn, 404, "Not found") end
end

Plug.Cowboy.http(StaticServer, [], port: 8000)
Process.sleep(:infinity)
```

Run:

```bash
elixir static_server.exs
```

Features:
- Directory listing: No (add custom handler)
- Full Plug ecosystem
- Production-grade (Cowboy server)


path: references/rust.md
content: # Rust HTTP Static Server

## miniserve (recommended)

Install:

```bash
cargo install miniserve
```

Run:

```bash
miniserve -p 8000 .
```

Bind to all interfaces:

```bash
miniserve -p 8000 --interfaces 0.0.0.0 .
```

With authentication:

```bash
miniserve -p 8000 --auth user:password .
```

Features:
- Directory listing: Yes (with clean UI)
- File upload: `--upload-files`
- WebDAV support
- Authentication: `--auth`
- HTTPS: `--tls-cert` and `--tls-key`
- QR code for easy mobile access: `--qrcode`

## http (thecoshman/http)

Install:

```bash
cargo install https
```

Run:

```bash
http -p 8000
```

Features:
- Directory listing: Yes
- Simple and lightweight
- Automatic MIME type detection

## Using cargo without install

```bash
cargo install miniserve && miniserve -p 8000 .
```

Or via `cargo-binstall` for faster binary install:

```bash
cargo binstall miniserve
miniserve -p 8000 .
```


path: references/php.md
content: # PHP HTTP Static Server

## Built-in Development Server (PHP >= 5.4)

```bash
php -S 127.0.0.1:8000
```

Bind to all interfaces:

```bash
php -S 0.0.0.0:8000
```

Serve a specific directory:

```bash
php -S 127.0.0.1:8000 -t /path/to/dir
```

With a custom router script:

```bash
php -S 127.0.0.1:8000 router.php
```

Features:
- Directory listing: No
- HTTPS: No (use reverse proxy)
- Built into PHP since 5.4
- Supports PHP script execution
- Single-threaded (development use only)

## Docker PHP

Run without local PHP installation:

```bash
docker run -it --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp -p 8000:8000 php:8.2-cli php -S 0.0.0.0:8000
```

Note: The built-in PHP server is intended for development only. Do not use in production.


path: references/deno.md
content: # Deno HTTP Static Server

## Standard Library File Server

```bash
deno run --allow-net --allow-read jsr:@std/http/file-server
```

Custom port:

```bash
deno run --allow-net --allow-read jsr:@std/http/file-server --port 8000
```

Serve a specific directory:

```bash
deno run --allow-net --allow-read jsr:@std/http/file-server /path/to/dir
```

Bind to all interfaces:

```bash
deno run --allow-net --allow-read jsr:@std/http/file-server --host 0.0.0.0
```

Features:
- Directory listing: Yes
- CORS: `--cors`
- HTTPS: `--cert` and `--key` flags
- Secure by default (requires explicit permission flags)
- No install needed, runs directly from JSR registry
- Default port: 4507

## Older Deno versions

For Deno versions before JSR support:

```bash
deno run --allow-net --allow-read https://deno.land/std/http/file_server.ts
```


path: references/algernon.md
content: # Algernon HTTP Static Server

## Quick start

```bash
algernon -x -n . :8000
```

Or simply:

```bash
algernon 8000
```

Features:
- Directory listing: Yes
- Built-in Lua scripting
- Markdown rendering
- QUIC/HTTP2 support
- Live reload
- Built-in template engines (Amber, Pongo2)
- Auto-HTTPS with Let's Encrypt

## Install

- macOS: `brew install algernon`
- Go: `go install github.com/xyproto/algernon@latest`
- Download: Available from GitHub releases

## Flags

| Flag | Description |
|---|---|
| `-x` | Simple mode (no Lua, no caching) |
| `-n` | No headers (simpler output) |
| `--dir DIR` | Serve a specific directory |
| `--cors` | Enable CORS headers |
| `-q` | Quiet mode |

## Serve current directory without features

For pure static file serving without Lua/template processing:

```bash
algernon -x . :8000
```

Note: Algernon is a feature-rich web server that goes well beyond static file serving. The `-x` flag disables advanced features for simple static serving use cases.


path: references/webfs.md
content: # webfs HTTP Static Server

## webfsd

```bash
webfsd -F -p 8000
```

Serve a specific directory:

```bash
webfsd -F -p 8000 -r /path/to/dir
```

Bind to specific address:

```bash
webfsd -F -p 8000 -b 0.0.0.0
```

Features:
- Directory listing: Yes
- Lightweight Unix-style server
- `-F` flag: run in foreground
- Supports virtual hosts
- CGI support

## Install

- Debian/Ubuntu: `apt install webfs`
- From source: Available on most Linux package managers

## Common flags

| Flag | Description |
|---|---|
| `-F` | Run in foreground |
| `-p PORT` | Listen port |
| `-r DIR` | Document root |
| `-b ADDR` | Bind address |
| `-f INDEX` | Index file name |
| `-n HOSTNAME` | Virtual hostname |

Note: `webfs` is a simple, lightweight HTTP server primarily found on Linux systems. It may not be available on macOS or Windows.


path: references/lighttpd.md
content: # lighttpd HTTP Static Server

## Inline configuration

```bash
lighttpd -Df - << EOF
server.document-root = "$PWD"
server.port = 8000
EOF
```

With directory listing:

```bash
lighttpd -Df - << EOF
server.document-root = "$PWD"
server.port = 8000
dir-listing.activate = "enable"
EOF
```

Bind to all interfaces:

```bash
lighttpd -Df - << EOF
server.document-root = "$PWD"
server.port = 8000
server.bind = "0.0.0.0"
EOF
```

Features:
- Directory listing: Configurable (`dir-listing.activate`)
- Production-grade lightweight server
- Low memory footprint
- Module system for extended functionality
- Flags: `-D` (don't daemonize), `-f` (config from file/stdin)

## With config file

Create `lighttpd.conf`:

```
server.document-root = "/path/to/dir"
server.port = 8000
server.bind = "0.0.0.0"
dir-listing.activate = "enable"
mimetype.assign = (
    ".html" => "text/html",
    ".css"  => "text/css",
    ".js"   => "text/javascript",
    ".json" => "application/json",
    ".png"  => "image/png",
    ".jpg"  => "image/jpeg"
)
```

```bash
lighttpd -Df lighttpd.conf
```

## Install

- macOS: `brew install lighttpd`
- Debian/Ubuntu: `apt install lighttpd`
- Alpine: `apk add lighttpd`


path: references/erlang.md
content: # Erlang HTTP Static Server

## inets (built-in)

```bash
erl -s inets -eval 'inets:start(httpd,[{server_name,"NAME"},{document_root, "."},{server_root, "."},{port, 8000},{mime_types,[{"html","text/html"},{"htm","text/html"},{"js","text/javascript"},{"css","text/css"},{"gif","image/gif"},{"jpg","image/jpeg"},{"jpeg","image/jpeg"},{"png","image/png"}]}]).'
```

Features:
- Directory listing: No
- Built into OTP (no install needed)
- Supports custom MIME types
- Configurable via Erlang terms

Custom bind address (add to options):

```erlang
{bind_address, {0,0,0,0}}
```

Note: The `inets` httpd is part of Erlang/OTP and requires no external dependencies. The MIME types must be explicitly configured as shown above.


path: references/java.md
content: # Java HTTP Static Server

## jwebserver (Java 18+, recommended)

The simplest option, built into JDK 18+:

```bash
jwebserver -d . -b 0.0.0.0 -p 8000
```

Serve with default settings (port 8000, localhost only):

```bash
jwebserver
```

Custom directory:

```bash
jwebserver -d /path/to/dir -p 8000
```

Features:
- Directory listing: Yes
- Built into JDK 18+
- No dependencies needed
- Verbose output: `-o verbose`

## jdk.httpserver module

```bash
java -m jdk.httpserver -d . -b 0.0.0.0 -p 8000
```

This is equivalent to `jwebserver` but invoked via the module system.

## Inline Java (any version with JDK)

For older Java versions, create `Server.java`:

```java
import com.sun.net.httpserver.*;
import java.net.InetSocketAddress;
import java.nio.file.*;

public class Server {
    public static void main(String[] args) throws Exception {
        var server = HttpServer.create(new InetSocketAddress(8000), 0);
        server.createContext("/", exchange -> {
            var path = Path.of("." + exchange.getRequestURI().getPath());
            var bytes = Files.readAllBytes(path);
            exchange.sendResponseHeaders(200, bytes.length);
            exchange.getResponseBody().write(bytes);
            exchange.close();
        });
        server.start();
    }
}
```

```bash
java Server.java
```

Note: `jwebserver` is the recommended approach for Java 18+.


path: references/ruby.md
content: # Ruby HTTP Static Server

## ruby -run (Ruby 1.9.2+, recommended)

The simplest built-in option:

```bash
ruby -run -ehttpd . -p8000
```

Features:
- Directory listing: Yes
- No gem install needed
- Uses WEBrick under the hood

## WEBrick (explicit)

```bash
ruby -rwebrick -e'WEBrick::HTTPServer.new(:Port => 8000, :DocumentRoot => Dir.pwd).start'
```

Bind to all interfaces:

```bash
ruby -rwebrick -e'WEBrick::HTTPServer.new(:Port => 8000, :BindAddress => "0.0.0.0", :DocumentRoot => Dir.pwd).start'
```

Features:
- Directory listing: Yes
- Part of Ruby standard library
- Configurable via Ruby API

## adsf (A Dead Simple Fileserver)

Install:

```bash
gem install adsf
```

Run:

```bash
adsf -p 8000
```

Features:
- Directory listing: No
- Minimal and clean
- Uses Rack under the hood

## Sinatra

Install:

```bash
gem install sinatra
```

Run:

```bash
ruby -rsinatra -e'set :public_folder, "."; set :port, 8000'
```

Features:
- Directory listing: No
- Full Sinatra DSL available for customization
- Good for adding custom routes alongside static files


path: references/docker.md
content: # Docker HTTP Static Server

## Nginx (recommended)

```bash
docker run --rm -v "$PWD":/usr/share/nginx/html:ro -p 8000:80 nginx
```

With custom config:

```bash
docker run --rm -v "$PWD":/usr/share/nginx/html:ro -v "$PWD/nginx.conf":/etc/nginx/conf.d/default.conf:ro -p 8000:80 nginx
```

Features:
- Directory listing: Configurable via nginx.conf (`autoindex on;`)
- Production-grade
- No local runtime needed (only Docker)
- Custom configuration support

## PHP

```bash
docker run -it --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp -p 8000:8000 php:8.2-cli php -S 0.0.0.0:8000
```

## Python

```bash
docker run --rm -v "$PWD":/srv -w /srv -p 8000:8000 python:3-slim python -m http.server 8000
```

## Alpine with BusyBox

Ultra-lightweight:

```bash
docker run --rm -v "$PWD":/www -p 8000:8000 alpine sh -c "busybox httpd -f -p 8000 -h /www"
```

## Common Docker options

| Option | Description |
|---|---|
| `--rm` | Remove container when stopped |
| `-d` | Run in background (detached) |
| `-v "$PWD":/path:ro` | Mount current directory read-only |
| `-p 8000:80` | Map host port 8000 to container port 80 |
| `--name myserver` | Name the container for easy management |


path: references/powershell.md
content: # PowerShell HTTP Static Server

## Pode Module (recommended)

Install:

```powershell
Install-Module -Name Pode
```

One-liner:

```powershell
Start-PodeStaticServer -Port 8000 -FileBrowser -Address 0.0.0.0
```

Features:
- Directory listing: Yes (`-FileBrowser`)
- HTTPS support
- Authentication middleware
- Cross-platform (PowerShell Core)

## .NET HttpListener (no modules needed)

```powershell
$listener = [System.Net.HttpListener]::new()
$listener.Prefixes.Add("http://localhost:8000/")
$listener.Start()
Write-Host "Serving on http://localhost:8000/"
while ($listener.IsListening) {
    $context = $listener.GetContext()
    $path = Join-Path $PWD $context.Request.Url.LocalPath
    if (Test-Path $path -PathType Leaf) {
        $bytes = [System.IO.File]::ReadAllBytes($path)
        $context.Response.OutputStream.Write($bytes, 0, $bytes.Length)
    } else {
        $context.Response.StatusCode = 404
    }
    $context.Response.Close()
}
```

Features:
- No module install needed
- Works on Windows PowerShell and PowerShell Core

## IIS Express (Windows only)

```cmd
"C:\Program Files (x86)\IIS Express\iisexpress.exe" /path:C:\MyWeb /port:8000
```

Features:
- Directory listing: No
- `/path` must be an absolute path
- Full IIS feature set
- Windows only


path: references/perl.md
content: # Perl HTTP Static Server

## Plack (recommended)

Install:

```bash
cpan Plack
```

Run:

```bash
plackup -MPlack::App::Directory -e 'Plack::App::Directory->new(root=>".");' -p 8000
```

Features:
- Directory listing: Yes
- Middleware ecosystem (Plack::Middleware::*)
- PSGI-compatible
- Multiple server backends

## HTTP::Server::Brick

Install:

```bash
cpan HTTP::Server::Brick
```

Run:

```bash
perl -MHTTP::Server::Brick -e '$s=HTTP::Server::Brick->new(port=>8000); $s->mount("/"=>{path=>"."}); $s->start'
```

Features:
- Directory listing: Yes
- Simple API
- Mountable paths

## Mojolicious::Lite

Install:

```bash
cpan Mojolicious::Lite
```

Run:

```bash
perl -MMojolicious::Lite -MCwd -e 'app->static->paths->[0]=getcwd; app->start' daemon -l http://*:8000
```

Features:
- Directory listing: No
- Full web framework available
- WebSocket support
- Hot reload in development mode
- Good for adding dynamic routes alongside static files


path: references/nodejs.md
content: # Node.js HTTP Static Server

## npx http-server (zero-install, recommended)

```bash
npx http-server -p 8000
```

With CORS enabled:

```bash
npx http-server -p 8000 --cors
```

Features:
- Directory listing: Yes
- CORS support: `--cors`
- HTTPS: `--ssl --cert cert.pem --key key.pem`
- Caching: `-c-1` disables caching
- Gzip: `--gzip`

## npx serve

```bash
npx serve -l 8000
```

Features:
- Directory listing: Yes (with clean UI)
- Single-page app mode: `--single`
- CORS: `--cors`
- Configuration via `serve.json`

## Global install

```bash
npm install -g http-server
http-server -p 8000
```

## node-static

No directory listings.

```bash
npm install -g node-static
static -p 8000
```

Or inline:

```bash
npx node-static -p 8000
```

Features:
- Directory listing: No
- Efficient static file serving
- Custom headers support
- RFC 2616 compliant caching

## Inline Node.js script (no dependencies)

```bash
node -e "require('http').createServer((req,res)=>{require('fs').createReadStream('.'+req.url).pipe(res)}).listen(8000)"
```

Note: This is minimal and does not handle errors, MIME types, or directory listing.


Security scan verdicts — ClawScan: suspicious | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (CRITICAL)