Skip to content

jarekmachaj/dotnet-serve

 
 

Repository files navigation

dotnet-serve

AppVeyor build status

NuGet MyGet

A simple command-line HTTP server.

It launches a server in the current working directory and serves all files in it.

Installation

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

Usage: dotnet serve [options]

Options:
  --version                          Show version information
  -?|-h|--help                       Show help information
  -d|--directory <DIRECTORY>         The root directory to serve. [Current directory]
  -o|--open-browser                  Open a web browser when the server starts. [false]
  -p|--port <PORT>                   Port to use [8080]. Use 0 for a dynamic port.
  -a|--address <ADDRESS>             Address to use [0.0.0.0]
  --path-base <PATH>                 The base URL path of postpended to the site url.
  --default-extensions:<EXTENSIONS>  A comma-delimited list of extensions to use when no extension is provided in the URL. [.html,.htm]
  -q|--quiet                         Show less console output.
  -v|--verbose                       Show more console output.
  --razor                            Enable Razor Pages support (Experimental)

About

Simple command-line HTTP server for .NET Core CLI

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 95.5%
  • PowerShell 3.6%
  • Batchfile 0.9%