http-server

github.com/http-party/http-server Web Development Open-source projectOpen source

Serve static files from the command line with http-server, a zero-configuration HTTP server.

github.com/http-party/http-server
http-server homepage screenshot

About http-server

http-server is a zero-configuration, command-line HTTP server for serving static files. The project describes it as usable for production usage as well as testing, local development and learning.

It serves a specified path, defaulting to ./public if that folder exists and ./ otherwise, on port 8080 with caching enabled by default. It can be run on-demand with npx, installed globally via npm or Homebrew, used as an npm dependency, or built as a Docker image since no public image is provided.

Key features

  • Serve static files from a specified local path
  • Run on-demand with npx without prior install
  • Serve precompressed gzip and brotli files when enabled
  • Proxy locally unresolved requests to another URL
  • Enable HTTPS with custom cert and key files
  • Configure port, address, cache time and headers
Best for: Developers who need to serve static files quickly for testing and local development.
Good for
  • Zero-configuration command-line operation for static files
  • Multiple install options including npx, npm and Homebrew
  • Configurable caching, compression, proxying and TLS options
Watch out for
  • No public Docker image is provided; image must be built locally

http-server at a glance

Type
Open-source project
Pricing
Not confirmed. Check the site
Open source
Yes · Source code
Language
English
Last checked
Oct 5, 2026 · Online when checked
Listed
Oct 5, 2026

http-server alternatives

Tools and sites you could use instead, ranked by how closely they match.

All 15 alternatives

Popular in Web Development

Well-known listings from the same topic.

All 122

http-server FAQ

How do I run http-server without installing it first?
Use npx http-server [path] [options] to run it on-demand.
Which folder is served by default?
[path] defaults to ./public if the folder exists, and ./ otherwise.
How do I disable caching?
Caching is on by default; add -c-1 as an option to disable it.
Is something wrong or out of date?

Tell us and an editor will check it.

Own this website?

Claim the listing and suggest updates yourself. An editor checks every claim first.

Claim this listing