http-server vs oha
Which should you use? A side-by-side look at what each one does, who it suits, what it costs, how hard it is to set up, and where each falls short.
Open source · MIT
A zero-setup command-line tool that serves files from a folder over HTTP.
Open source · MIT
A command-line tool that sends many HTTP requests to a web server and shows live results.
The short answer
Choose http-server if you need…
- Front-end developers who want to preview a static site or single-page app locally
- Students learning how web servers and HTTP work
- Testing a built HTML/CSS/JavaScript folder quickly without setting up a full server
- Developers who need a simple proxy or HTTPS server for local testing
Choose oha if you need…
- Developers checking how an API or website handles many simultaneous requests
- Backend engineers comparing performance before and after a change
- People who prefer a terminal tool with a live view over reading raw output
- Users who want to set a request rate limit or test over HTTP/2
Side-by-side
| http-server | oha | |
|---|---|---|
| Type | CLI | CLI |
| Price | Free and open source | Free and open source |
| Licence | MIT | MIT |
| GitHub stars | 14.2k | 10.7k |
| Setup difficulty | Beginner | Beginner |
| How you get it | Install with a package manager | Install with a package manager |
| Main language | JavaScript | Rust |
| Last code update | 7 months ago | 4 days ago |
What each one is
http-server
http-server is a command-line tool that turns a folder on your computer into a website you can view in a browser, with no configuration file needed. It is described as powerful enough for production use, but simple enough for testing, local development and learning. You run it from a terminal, point it at a folder, and it serves that folder at a local address such as http://localhost:8080.
oha
oha is a command-line program that sends a large number of HTTP requests to a web address to see how it performs under load. While it runs, it shows a live terminal display with progress and results. It is written in Rust and is inspired by the older hey tool.
Best for
http-server
- Front-end developers who want to preview a static site or single-page app locally
- Students learning how web servers and HTTP work
- Testing a built HTML/CSS/JavaScript folder quickly without setting up a full server
- Developers who need a simple proxy or HTTPS server for local testing
oha
- Developers checking how an API or website handles many simultaneous requests
- Backend engineers comparing performance before and after a change
- People who prefer a terminal tool with a live view over reading raw output
- Users who want to set a request rate limit or test over HTTP/2
Strengths
http-server
- Zero configuration: a single command serves a folder
- Wide range of options for caching, CORS, proxying, HTTPS and basic auth, documented in one table
- MIT licensed and installable through npm, npx or Homebrew
oha
- Live terminal display shows progress while the test runs
- Many options cover headers, bodies, authentication, TLS certificates and HTTP versions
- Available through several package managers and as pre-built binaries for major operating systems
Not ideal for
http-server
- People who need dynamic server-side logic, since it serves static files and proxies requests rather than running application code (inferred from its static-server description)
- Anyone who needs a managed production hosting service with scaling and monitoring; the README mentions production usability but does not describe hosting infrastructure
oha
- Testing a whole user journey across many steps, since the README describes sending requests to a URL rather than scripted scenarios
- Anyone needing a graphical interface, since the tool is terminal-based
- Testing live production systems without permission, because heavy load can cause outages
Trade-offs
http-server
- No public Docker image is provided; you must build one from the included Dockerfile
- Several options are documented in the README as having defaults that may surprise new users, such as caching being on by default
- The README is long with many options, so beginners may need time to find the parts they need
oha
- The README describes some features as experimental, such as HTTP/3 support
- Behavior differs from the similar hey tool in places, such as how -q is applied, so existing scripts may need changes
- Large numbers of connections may require raising the system's open-file limit, as the README notes
Getting started
http-server
Install globally via npm
npm install --global http-serverOr run on demand without installing
npx http-server [path] [options]oha
Install via Cargo
cargo install ohaInstall on macOS with Homebrew
brew install ohaFrequently asked questions
What is the difference between http-server and oha?
http-server: A zero-setup command-line tool that serves files from a folder over HTTP. oha: A command-line tool that sends many HTTP requests to a web server and shows live results. http-server suits front-end developers who want to preview a static site or single-page app locally, while oha suits developers checking how an api or website handles many simultaneous requests.
Are http-server and oha free?
http-server: Free and open source. oha: Free and open source.
Is http-server or oha more popular?
http-server has more GitHub stars (14.2k) than oha (10.7k). Popularity isn't the same as fit — check which one matches your use case above.
What are other alternatives to http-server and oha?
Other options people compare them with include Vegeta, fx.
Keep comparing
Built from our catalogue entries for both products: open-source details come from each project's README (AI-assisted, refreshed weekly) and GitHub data; AI-tool details are editorial. Spotted something wrong? Let us know from either product's page.