serve
Static file server for local development
TLDR
Serve current directory
SYNOPSIS
serve [-p port] [-l address] [-s] [options] [path]
DESCRIPTION
serve is a zero-configuration static file server for local development, created by Vercel. It serves the contents of a directory over HTTP with no setup required — just run serve in any directory to start hosting files.
Single-page application (SPA) mode redirects all routes to index.html, making it suitable for testing client-side routing. CORS can be enabled with a single flag for cross-origin API testing. HTTPS is supported through SSL certificate and key files for testing secure connections locally.
PARAMETERS
-p PORT
Port number.-l ADDRESS
Listen address.-s
Single page app mode.-C
Enable CORS.-n
Disable clipboard copy.-d
Debug mode.--ssl-cert FILE
SSL certificate.
CAVEATS
Development use only. Not production server. Node.js required.
HISTORY
serve is developed by Vercel (formerly ZEIT) as a simple static file server for local development.
SEE ALSO
http-server(1), python(1), nginx(1)
