DotNetStatic 1.0.1

dotnet tool install --global DotNetStatic --version 1.0.1
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local DotNetStatic --version 1.0.1
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=DotNetStatic&version=1.0.1
                    
nuke :add-package DotNetStatic --version 1.0.1
                    

DotNetStatic

Build Status

DotNetStatic is a simple tool to spin up a web server on your local machine to host static web files.

After starting the application you can open a broswer window and navigate to http://localhost:8080

Default documents are:

  • index.htm
  • index.html
  • default.htm
  • default.html

If no default document is found, it will show a directory browser.

To exit the application use "CTRL+C" or close the command prompt.

Install

dotnet tool install --global DotNetStatic

Uninstall

dotnet tool uninstall -g DotNetStatic

Usage

Command Line: dotnetstatic start [options]

Options:
  -p|--port <port>       Set port number [default: 8080]
  -d|--directory <path>  Set content path [default: where the command was executed from]

Examples:

Command Prompt

> cd C:\mysite\wwwroot
> dotnetstatic start

Output:

info: Microsoft.Hosting.Lifetime[0]
      Now listening on: http://[::]:8080
info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
      Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
      Content root path: C:\mysite\wwwroot

Implementation Details

DotNetStatic is written in C# 7.3 with AspNetCore 3.1.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
.NET Core netcoreapp3.1 is compatible. 
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.1 704 5/1/2020