serve CLI

serve exposes a local folder, static site or single-page app over HTTP and provides a directory listing for file browsing.

  • 9,915 ★ on the repository
  • Last commit
  • MIT
CLI

Extended access

Why this level

  • The HTTP server can expose the selected directory to reachable network clients.
All reasons and checks

vercel/serve

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add cli/serve

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The HTTP server can expose the selected directory to reachable network clients.

This is third-party code. Review the repository files before installing.

What it does

After building a frontend, select its output directory and open it over HTTP in a browser. serve delivers HTML, a single-page app or an individual file and lists directory contents. Access can be local or networked according to configuration. The first launch needs only npx. A `serve.json` file inside the served directory configures redirects, HTTP headers and directory listings. The CLI reads these settings through serve-handler. Source compilation and application backend logic remain separate project tasks.

Who it is for. Frontend prototype authors previewing built sites or static files through local HTTP.

Good fit when

  • Open a completed site build for manual review.
  • Show an HTML prototype on a reachable device.
  • Choose a file from a browser directory listing.
  • Inspect a built single-page app before publication.

Not a fit when

  • You need server-side business logic and data processing.
  • Sources must be built automatically rather than served as files.
  • The directory contains secrets that network clients must not access.

Example request

Prepare a local serve preview of dist after checking it contains no secrets or unintended files.

Limitations

serve 14 and later require Node.js 14 or later. Build the project beforehand: this server neither compiles sources nor executes a backend. Clients receive files from the chosen directory, including its listing; keep private material, configuration files and credentials outside that area. The listening address and machine configuration determine network reachability, so review them before demonstrating on another device.

How to disable. End the serve process. The local server stops sharing the directory while its files remain on disk.

FAQ

Is a global install needed?

No. `npx serve` starts it from the current directory.

How do I serve another directory?

Without a global installation, use `npx serve folder-name/`. After a global install, `serve folder-name/` starts the same preview. Both expose the selected directory’s contents.

Where is file handling configured?

In the public directory’s `serve.json`, using serve-handler options.

Can I point it at sources instead of build output?

It serves them as files; it does not compile the app.

How do I list launch options?

After a global install, `serve --help` lists launch options. When using npx, run `npx serve --help`.

Discussion

No questions or reviews yet.

CLI tools

Angular’s official CLI creates application workspaces, starts development servers and supports ongoing project maintenance.

CLIExtended access27KRepository stars
Official

A visual website builder with a built-in MCP server: the agent helps assemble static pages with dynamic data on the model you choose

MCP serverExtended access3KRepository stars

CLI and local MCP server for web projects: templates, design systems, static checks and verification scripts.

CLIExtended access110Repository stars

Rockpack Starter is a React CLI with app and library templates built around TypeScript and extensible Webpack configuration.

CLIExtended access1.2KRepository stars

A local visual editor for an HTML page: edit with the mouse, preview scripts, save back to the same file.

SkillExtended access51Repository stars

Ties a running frontend to an agent: a click leads to the source line, and the agent sees live DOM, props and state.

PluginExtended access195Repository stars

README in short

The directoryListing option in serve.json disables listings or limits them to selected paths. unlisted hides names from the listing; it does not deny access to the files themselves.

README badge

Report a problem