AGENT SKILL

http-server

Use this skill when the user wants to serve static files via HTTP.

License 许可
MIT
所属仓库
javimosch/supercli
最近更新
2026-11-02
Stars
★ 57
Forks
5

01 前言 Front Matter

name
http-server
description
Use this skill when the user wants to serve static files via HTTP.

02 资源文件 10

03 SKILL.md 正文

HTTP-Server Plugin

Simple, zero-configuration command-line static HTTP server.

Commands

File Serving

  • http-server directory serve — Serve a directory as static HTTP server

Usage Examples

  • "http-server directory serve --path ./public"
  • "http-server directory serve --path ./public --port 3000"

Installation

npm install --global http-server

Examples

# Serve current directory
http-server

# Serve specific directory
http-server ./public

# Serve on custom port
http-server -p 3000

# Enable CORS
http-server --cors

# Enable gzip
http-server -g

# Silent mode
http-server -s

# Disable caching
http-server -c-1

# Custom headers
http-server -H "Access-Control-Allow-Origin:*"

# HTTPS with custom cert
http-server -S -C cert.pem -K key.pem

Key Features

  • Zero-configuration setup
  • Automatic directory listing
  • MIME type detection
  • CORS support
  • Gzip/Brotli compression
  • Caching control
  • Custom headers
  • HTTPS support
  • SPA support (404.html fallback)

04 同仓库更多 Skills