# serve

> Static file serving and directory listing

Source: https://talira.ai/catalog/serve-h1p22wew
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Command-line tool
- Categories: [developer tools / local servers / static](https://talira.ai/categories/developer-tools/local-servers/static)
- Platforms: cli[^2]
- Licence: MIT[^1]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Self-hostable: yes[^2]
- Backed by: [Vercel](https://talira.ai/orgs/vercel.md)
- Funding: Series F[^3]

serve is Vercel's command-line static file server for Node.js: `npx serve` in a folder serves a static site, a single-page app or a single file on your machine or local network, with a browsable directory listing. Flags turn on single-page-app rewrites to index.html (`--single`), CORS headers, HTTPS with your own certificate and key, symlinks and custom listen addresses, and gzip compression and ETags are on by default. Rewrites, redirects and headers are configured in a `serve.json` file, using the options of serve-handler, the same core published as middleware for Node's own HTTP server. It's MIT licensed; the README recommends Vercel for production hosting.

## Links

- GitHub: https://github.com/vercel/serve

## Problems it solves

- quickly serve a folder of static files over HTTP to test my build
- my single-page app's routes 404 when I refresh in a local static server
- share a folder with another device on my local network from the terminal
- preview a production build of a React app without setting up nginx
- serve local files with CORS headers so another dev server can fetch them
- test my static site over HTTPS locally with my own certificate
- add static file serving with rewrites and headers to an existing Node HTTP server

## Features

- serves static sites, single-page apps and single files
- directory listing UI
- --single rewrites unknown paths to index.html for SPAs
- --cors headers
- HTTPS with --ssl-cert, --ssl-key and --ssl-pass
- gzip compression and ETags on by default
- serve.json config for rewrites, redirects and headers
- copies the local URL to the clipboard and switches port when busy
- serve-handler middleware for Node's HTTP server

## Capabilities

- Has a command line tool: plan not known

## Trust

Overall: 0.42 out of 1.
Signals: backing 0.55, extensibility 0.20.

- backed by Vercel
- funding: Series F

Warnings:

- GitHub activity not fetched yet

## Alternatives

- [Caddy](https://talira.ai/catalog/caddy-vc8j4642.md): The Ultimate Server with Automatic HTTPS
- [miniserve](https://talira.ai/catalog/miniserve-97q0qgsy.md): Serve some files over HTTP right now

## Sources

[^1]: https://github.com/vercel/serve/blob/main/license.md (checked 22 Nov 2026)
[^2]: https://github.com/vercel/serve (checked 22 Nov 2026)
[^3]: https://vercel.com/blog/series-f (checked 20 Nov 2026)
