sirv-cli is a lightweight, zero-config CLI tool for serving static files from any directory. It supports HTTP/2, CORS, ETags, gzip/brotli precompressed files, single-page app fallback, and immutable cache headers. Version 3.0.1 requires Node 18+ and ships native ESM via an exports map. It differs from alternatives like http-server or serve by being minimal, fast, and designed for development previews. Regular releases (2-3 per year) with breaking changes infrequent.
npm install sirv-cliVerified import paths — ran on the pinned version, not inferred.
Install sirv-cli globally and start a dev server on port 8080.
Upgrade Node.js to version 18 or later.
Update scripts or explicitly use --port 5000 if needed.
Use HTTPS with a reverse proxy for HTTP/2 in production.
Unset environment variables or use flags exclusively.
Add --host flag to allow network access.
Use a different port with --port or kill the process using the current port.
Run 'npm install -g sirv-cli' or 'npx sirv-cli'.
Install globally with 'npm install -g sirv-cli' or use npx.
No dependency data recorded yet.