A simple command-line HTTP server.
It launches a server in the current working directory and serves all files in it.
The latest release of dotnet-serve requires the 2.1.300-preview1 .NET Core SDK or newer. Once installed, run this command:
dotnet install tool --global dotnet-serve
Usage: dotnet serve [arguments] [options]
Arguments:
path Base path to the server root
Options:
-?|-h|--help Show help information
-p|--port <PORT> Port to use [8080]. Use 0 for a dynamic port.
-a|--address <ADDRESS> Address to use [0.0.0.0]
-o|--open-browser Open a web browser when the server starts. [false]
--path-base <PATH> The base URL path of postpended to the site url.