# 使用 Homebrew, Nix 安装 http-server

查看 http-server 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:http-server
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install http-server
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#http-server
```

  证据: nixpkgs package indexes: pkgs/by-name/ht/http-server/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:http-server
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/http-server>
- **版本:** 14.1.1
- **来源摘要:** Simple zero-configuration command-line HTTP server
- **主页:** <https://github.com/http-party/http-server>
- **仓库:** <https://github.com/http-party/http-server>
- **许可证:** MIT
- **源码归档:** <https://registry.npmjs.org/http-server/-/http-server-14.1.1.tgz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- http-server (cli)
- http-server (别名)

## 依赖

- node

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 all

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 14.1.1
- 本地数据: OK
- 上游仓库: https://github.com/http-party/http-server
- 信息: No package-manager update timestamp was available.
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

http-server is a Node.js command-line static HTTP server. Its README describes a zero-configuration server that is simple enough for testing, local development, and learning, but also includes practical options for caching, directory listings, proxying, TLS, headers, and authentication.

### 项目历史

The GitHub repository was created in June 2011, and npm registry metadata records the package beginning the same day with version 0.1.0. The project became one of the standard Node-era answers to 'serve this folder over localhost' before npx made one-off CLI execution common.

The package evolved from a tiny static-file helper into a more featureful local server. The README documents installation through npx, global npm, Homebrew, dependency installation, and Docker builds, while release metadata shows the project reaching the 14.x line in 2021 and 2022.

### 采用历史

http-server's adoption is visible across npm, GitHub, and Homebrew: the official README includes npm and Homebrew badges, GitHub displays a large star/fork footprint and many dependents, and the input metadata records Homebrew and Nix packaging. Its popularity comes from needing no application framework when all a developer wants is static files over HTTP.

### 使用方式

Common use is `npx http-server` or a global `http-server` command pointed at a directory. Options cover port and address selection, cache control, gzip and Brotli serving, CORS headers, custom headers, SPA-style proxy fallback, TLS certificates, basic authentication, robots.txt generation, and MIME overrides.

### 为什么软件包爱好者会关心

For package nerds, http-server is a classic small CLI that became infrastructure glue. It sits at the intersection of npm's executable-bin model, frontend local development, static-site demos, and Homebrew packaging for JavaScript tools that people want outside a single Node project.

### 时间线

- 2011: The http-party/http-server repository was created on GitHub.
- 2011: The npm package was created with early 0.1.x versions.
- 2017: The GitHub release list includes the 0.10.0 release.
- 2021: The project published the 13.x and 14.0.0 release lines.
- 2022: The project published the 14.1.x release line.

### Related projects

- Related tools include Python's built-in simple HTTP server, serve, live-server, Caddy, Vite dev server workflows, and the Rust http-server package. It also uses Node and npm conventions for command distribution.

### 来源

- Official GitHub README/release metadata and npm registry metadata.


## 安全说明

broad file, network, media, or database tool signal.

- **Geiger 风险:** blue / 中
- broad file, network, media, or database tool signal

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** http-server
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Conflicts With:** http-server-rs
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## 其他软件包管理器记录

- Nix - http-server: normalized package name match | nixpkgs package indexes: pkgs/by-name/ht/http-server/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://pkg.so/zh-hans/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [node](https://pkg.so/zh-hans/brew/node/) - Runtime dependency declared by Homebrew.
- [serve](https://pkg.so/zh-hans/brew/serve/) - Shares pkgdb curated category or tags: cli, developer-tools, http-server, static-server.
- [pnpm](https://pkg.so/zh-hans/brew/pnpm/) - Shares pkgdb curated category or tags: cli, developer-tools, nodejs.
- [yarn](https://pkg.so/zh-hans/brew/yarn/) - Shares pkgdb curated category or tags: cli, developer-tools, nodejs.
- [fnm](https://pkg.so/zh-hans/brew/fnm/) - Shares pkgdb curated category or tags: cli, developer-tools, nodejs.
- [node-build](https://pkg.so/zh-hans/brew/node-build/) - Shares pkgdb curated category or tags: cli, developer-tools, nodejs.
- [markdownlint-cli](https://pkg.so/zh-hans/brew/markdownlint-cli/) - Shares pkgdb curated category or tags: cli, developer-tools, nodejs.
- [nodenv](https://pkg.so/zh-hans/brew/nodenv/) - Shares pkgdb curated category or tags: cli, developer-tools, nodejs.
- [volta](https://pkg.so/zh-hans/brew/volta/) - Shares pkgdb curated category or tags: cli, developer-tools, nodejs.
- [http-server](https://pkg.so/zh-hans/npm/http-server/) - Same normalized package name appears in another local ecosystem. Shared terms: cli, command-line, configuration, files, http.
- [gulp-cli](https://pkg.so/zh-hans/brew/gulp-cli/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, command-line, developer, developer-tools, line.
- [http-server](https://pkg.so/zh-hans/npm/http-server/) - Same normalized package name in another local ecosystem.

## Combined YAML source

View the package source record on GitHub. [combined/http-server.yml](https://github.com/mxcl/pkgdb/blob/main/combined/http-server.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
