Lakerfield.HttpServer
1.0.0
Prefix Reserved
dotnet tool install --global Lakerfield.HttpServer --version 1.0.0
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local Lakerfield.HttpServer --version 1.0.0
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Lakerfield.HttpServer&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package Lakerfield.HttpServer --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Lakerfield.HttpServer
A simple .NET global tool that serves a folder as static files over HTTP, with an interactive TUI and a CLI mode.
Installation
dotnet tool install --global Lakerfield.HttpServer
Run without installing
dnx Lakerfield.HttpServer
Usage
Interactive mode
Run without arguments to get an interactive settings menu. The cursor starts on Start server, so pressing Enter immediately serves the current folder with index.html on port 8080, bound to localhost only. Use the arrow keys to move to a setting and press Enter to change it; yes/no settings toggle directly.
http-server
> Start server
Folder C:\projects\site
Port 8080
Bind localhost
Default file index.html
Directory browser no
Authentication public
Request logging yes
CORS no
SPA fallback no
No-cache headers yes
Settings:
- Folder to serve (default: current folder)
- Port (default: 8080)
- Bind address: localhost only, all interfaces, one of the listed network adapters, or a specific IP
- Default file name (default:
index.html; clear the value with Backspace or Escape to disable) - Directory browser (enabled by default when the default file is missing)
- Authentication: public or basic HTTP auth with username/password
- Request logging to the console
- CORS (allow any origin)
- SPA fallback (serve the default file for unknown routes)
- No-cache headers
CLI mode
Pass a folder and/or options to start the server directly without questions.
http-server [folder] [options]
-p, --port <port> Port to listen on (default: 8080)
-b, --bind <address> localhost, all or an IP address (default: localhost)
-i, --index <file> Default file name, empty to disable (default: index.html)
-d, --dir Enable directory browser
-a, --auth <user[:pass]> Require basic auth, prompts for password when omitted
-c, --cors Allow any origin (CORS)
-s, --spa SPA fallback: unknown routes serve the default file
--cache Do not send no-cache headers
-q, --quiet Do not log requests
-h, --help Show help
Examples:
# Serve the current folder on localhost:8080
http-server .
# Serve a SPA build on port 3000 with history fallback
http-server ./dist -p 3000 -s
# Share a folder on the network with directory listing and basic auth
http-server C:\share -b all -d -a admin:secret
Press Ctrl+C to stop the server.
Requirements
- .NET 10 runtime (including ASP.NET Core)
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 109 | 10/15/2026 |