qmetrics.net

HTTP Server

Zero-config command-line static HTTP server

http-server is a Node.js CLI tool that serves files from a directory with sensible defaults for local testing, development, and learning.

Overview

http-server serves static content from a chosen folder without extra setup. A default path prefers ./public when it exists, otherwise the current directory. It is intended for quick local hosting during development or demos rather than as a full production stack, though the project notes it can handle production-style serving when configured.

The CLI exposes controls for port, bind address, directory listings, cache lifetime, gzip and brotli precompressed files, CORS and related headers, TLS with custom certificates, basic authentication, proxy forwarding, SPA-friendly 404 handling, and robots.txt generation. Magic files such as index.html and 404.html enable single-page application hosting patterns.

You can install it globally through npm or Homebrew, add it as a project dependency, invoke it once with npx without installing, or build and run a container from the supplied Dockerfile when you need an isolated environment.

Logging options cover client IP addresses, UTC timestamps, custom response headers, and silent modes, while connection timeouts and allowed host lists help constrain how the server behaves on a machine.

Key features

  • Static file serving from a path
  • Directory listings and index files
  • Gzip and brotli static compression
  • CORS and security header switches
  • HTTPS with certificate paths
  • Basic auth and proxy modes
  • SPA-friendly 404.html support
  • npx on-demand execution

Use cases

  • Local frontend previews
  • Sharing build output on a LAN
  • Teaching HTTP static hosting
  • Quick SPA prototype hosting
  • Temporary file drops during development

Tags

Similar software

axios

Promise-based HTTP client for browser and Node.js

Axios is a promise-based HTTP client for JavaScript environments in the browser and Node.js. It supports common request methods, configurable defaults, and interceptors for request and response handling.

★ 109.5k⟳ 2 days agoMIT

FastAPI

Python web framework for building APIs with type hints

FastAPI is a Python web framework for building APIs using standard type hints. It builds on Starlette and Pydantic and generates interactive OpenAPI documentation for the endpoints you define.

★ 105.1k⟳ 9 days agoMIT

OmniRoute

OpenAI-compatible AI gateway with provider routing

OmniRoute exposes one endpoint that routes chat requests across many LLM providers with quota-aware fallback and compression.

★ 90.7k⟳ todayMIT

Hoppscotch

Web, desktop and CLI API development ecosystem

Hoppscotch lets developers send HTTP, WebSocket, GraphQL, and related API requests from a lightweight client. Collections, environments, teams, and sync help organize testing across devices.

★ 81k⟳ 5 days agoMIT
Open Source Alternative to:Postman

NestJS

Progressive TypeScript framework for Node.js backends

Nest organizes Node server apps with modules, dependency injection, and first-party packages for auth, data, queues, and observability.

★ 77.2k⟳ todayMIT

JSON Server

Zero-code mock REST API from JSON data files

JSON Server turns a JSON or JSON5 database file into a REST API for local prototyping. It supports filtering, sorting, pagination, embedding relations, and static assets.

★ 75.7k⟳ 8 months agoMIT