| name | serve |
| description | Use this skill when the user wants to serve static files via HTTP. |
Serve Plugin
Static file serving and directory listing. Production-ready static file server.
Commands
File Serving
serve directory serve — Serve a directory as static HTTP server
Usage Examples
- "serve directory serve --path ./public"
- "serve directory serve --path ./public --port 8080"
Installation
npm install -g serve
Examples
serve
serve ./public
serve -p 8080
serve -s
serve -n
serve -o
serve -l tcp://0.0.0.0:3000
serve -h '{"Access-Control-Allow-Origin": "*"}'
serve -c
Key Features
- Production-ready static file server
- SPA support with --single flag
- Directory listing
- CORS support
- Custom headers
- Automatic browser opening
- Caching control
- Zero-configuration