Skip to main content

Flags

Flags are provided without any values. For example:

http-server --help
NameShortLongDescription
Cross-Origin Resource SharingN/A--corsEnable Cross-Origin Resource Sharing allowing any origin
GZip CompressionN/A--gzipEnable GZip compression for responses
Graceful ShutdownN/A--graceful-shutdownWait for all requests to be fulfilled before shutting down the server
HelpN/A--helpPrint help information
Logger-l--loggerPrint HTTP request and response details to stdout
Version-V--versionPrint version information
Quiet-q--quietDon't print output to console
Index-i--indexRoute directories to index.html if present
SPAN/A--spaRoute non-existent files to /index.html