Giter Site home page Giter Site logo

natemcmaster / dotnet-serve Goto Github PK

View Code? Open in Web Editor NEW
791.0 791.0 65.0 364 KB

Simple command-line HTTPS server for the .NET Core CLI

Home Page: https://nuget.org/packages/dotnet-serve/

License: Apache License 2.0

PowerShell 1.35% C# 98.02% Shell 0.38% JavaScript 0.02% HTML 0.23%
command-line-tool dotnet dotnet-core webserver

dotnet-serve's Introduction

Hi there, I'm Nate 👋

I'm most known on GitHub for my contributions to the .NET project (https://github.com/dotnet) while working for my former employer, Microsoft. I'm now working for AWS and as don't have much time for open source as I'd like.

This is my personal account. Starting in 2019, activity on this account is a reflection of work I am doing in my personal time. This account is NOT used for activity supported or approved by my employer.

For work I'm doing on behalf of my employer, see @mcmasn-amzn.

📫 How to reach me:

Pronouns: he/him

dotnet-serve's People

Contributors

akoeplinger avatar albertwoo avatar andrewlock avatar ansariabr avatar ctyar avatar daveaglick avatar dependabot-preview[bot] avatar dependabot[bot] avatar gldraphael avatar kzu avatar lejsekt avatar mlaily avatar natemcmaster avatar onionhammer avatar pknam avatar pranavkm avatar shanselman avatar sonicgd avatar tarmil avatar wu-yafeng avatar ysmoradi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dotnet-serve's Issues

[Question] .netconfig storing wrong path?

When I use the --save-options flag, .netconfig will save the folder I specified with -d verbatim. But I wonder, why not save the path of the given folder relative to the config file itself? This way, with a tiny bit of extra work, dotnet serve could be invoked from anywhere in the source tree.

Add support for setting headers

Hi Nate,

First off - thanks for this tool, I use it regularly to serve static file sites.

One feature I found a need for recently was to set response headers. It was specifically CSP headers, but I think this should generalise to all response headers.

I was thinking you could set the response headers either using command line switches, or via a file (e.g. something like this, but probably just apply to all paths?)

What do you reckon?

Add FallbackToFile options for serving apps with client-side routing.

I have a react+typescript app use the React BrowserRouter.
For example, if I used React Router with a route for /todos , dotnet-serve will response a HTTP 404 .

This is because when there is a fresh page load for a /todos, the dotnet-server looks for the file build/todos{.html/htm} and does not find it. The dotnet-server should to be configured to respond to a request to /todos by serving index.html.

Describe the solution you'd like

Add options to configure FallbackToFile(...) endpoints. Such as :

dotnet serve --fallback-to-file "index.html"

Add support for virtual directories

It can be useful to serve a site behind a virtual directory when testing it if that's where it'll be served from in production. Otherwise, absolute links that contain the parent directories won't work correctly when served locally.

For example, if a file exists on disk at "/a/b.html" but it'll end up being served behind a username root folder like "/daveaglick/a/b.html", then being able to serve the site locally behind the same root folder becomes important.

I propose the feature should be opt-in behind a CLI option -v|--virtual <VIRTUAL PATH>.

I'm thinking that like #1, this feature would also require custom middleware. As with the extensionless URLs feature, I've already got an implementation in Wyam that could hopefully be ported without too much trouble (https://github.com/Wyamio/Wyam/blob/develop/src/core/Wyam.Hosting/Owin/VirtualDirectoryMiddleware.cs).

Add support for config as a file

Add support for configuring dotnet-serve options via file, so I don't have to keep remembering all the command line options I want to use.

Lookup:

  1. find file in cwd
  2. also lookup file in $HOME

TBD:
format - JSON? provides nice intellisense in vscode
filename? .dotnetserverc, serve.json dotnet-serve.json
schema

[Question] Any idea if there is a way to disable binding to IPv6

Thanks for the great library!

I'm trying to host something on localhost, but I get a warning about IPv6 binding failing. I only need to host on IPv4. I thought that setting the address to 127.0.0.1 might solve it, but it still seems to bind to localhost and on IPv6 as well as IPv4:

dotnet serve -d UI/build -a 127.0.0.1 -p 50055

warn: Microsoft.AspNetCore.Server.Kestrel[0]

  Unable to bind to http://localhost:50055 on the IPv6 loopback interface: 'Cannot assign requested address'.

Listening on:
http://localhost:50055

Press CTRL+C to exit

Enable setting open browser starting address

Is your feature request related to a problem? Please describe.
When using dotnet-server -o, enable setting the default path to navigate to.

Describe the solution you'd like
Add a <PATH> parameter to the -o arg, for example if the generated site is http://localhost:62320/ and path is main/index.html it should navigate to http://localhost:62320/main/index.html.

Can PR if approved. Please let me know if I can change the open-browser arg to a string instead of boolean, and open root address if path not specified otherwise navigate to specified address.

Add support for referencing SimpleServer as a public type in a nuget package

I'm busy working on some test tools that I need for a project, and it would be super helpful to be able to reference SimpleServer directly in C# from an integration test, and pass in my own configurations.

There are too many ways that Kestrel can be configured for us to expose all the variations as command line properties.

It also makes it easier to control the lifetime of the server from code within end to end integration tests allowing different tests to have different values, e.g. ports, headers, rate limiting etc that would be a nightmare to have to try to pass via command line arguments to a shell command.

Ambiguous certificate match

Describe the bug
When I try to use dotnet serve

dotnet serve -o -S -p 44444 -d publish

i get the following output

Failed to configure the HTTPS. Ambiguous certficiate match. Multiple certificates found with extension '1.3.6.1.4.1.311.84.1.1' (ASP.NET Core HTTPS development certificate). 

Do you have an idea what could be the root cause or how it can be fixed?

Add file extension MIME type mapping

It would be nice to be able to indicate a custom mapping from file extension to MIME type. My current use case is WebAssembly: the browser refuses to load a wasm module if the MIME type isn't "application/wasm".

Maybe with a syntax like this:

dotnet serve --mime .wasm=application/wasm

Add support for reverse proxy

It can be useful to provide a proxy feature in the dotnet-serve that can serve some routes into another site to bypass Same-origin policy in the browser.

iam trying to start two kafka cluster to make a replication but i get error

Iam trying to start two kafka cluster to make a replication and I start zookeeper and kafka for the first cluster , and start zookeeper for the second cluster but when iam getting to start kafka for the second cluster i get that error .
ERROR [KafkaServer id=0] Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
java.lang.RuntimeException: java.io.IOException: Failed to bind to /0.0.0.0:8090

add support for options request

please add support for options request

when I send a options request, I got a 404 returned.
when I send a GET request, it works.

image

Support for referencing in other projects

I am building a static site generator and was hoping to leverage dotnet-serve to server the static site.

The .NET Core Tools space is a little new to me, but I was either hoping I could do one of two things:

  1. Reference your tool via <DotNetCliToolReference Include="dotnet-serve" Version="1.0.0" />
    • I assume that these Tool References are for local development only and do not get packaged with the output of your application. Is that correct? This probably wouldn't solve my problem.
  2. Reference the actual NuGet package as a PackageReference and utilize your SimpleServer directly. Since I am also using CommandLineUtils, possible reference your command directly as a sub command of my application?

Either solution results in the following cryptic error :

XX.csproj : error NU1202: Package dotnet-serve 1.0.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package dotnet-serve 1.0.0 supports: netcoreapp2.1 (.NETCoreApp,Version=v2.1) / any

XX.csproj : error NU1212: Invalid project-package combination for dotnet-serve 1.0.0. DotnetToolReference project style can only contain references of the DotnetTool type

The first error, as I read it, contradicts itself. I am building a .NET Core 2.1 app.

Thoughts?

.NET 6 enablement

I'll take a look at submitting something but this should probably be bumped to .NET 6 (and possibly left there until the next LTS). I think there's a way to target both 5 and 6 in a single project, which would probably be ideal.

Running with .NET 6.0 RC1 - on an Apple M1: Nothing happens

Alright: I have a MBP with an Apple M1.
I am running .NET 6 RC1 for ARM.

After installing dotnet-serve and trying to run it in a folder, just nothing happens.

Can anybody confirm this behavior?

Screen.Recording.2021-09-25.at.15.39.52.mov

Thanks!

Compression is not working for dll files

Describe the bug
I tried to use this to serve blazor web assembly files, but the compression is only for for css, html etc. But not for dll file.

To Reproduce
Steps to reproduce the behavior:

  1. Create a empty blazor wasm project
  2. Publish in release mode
  3. Run dotnet-serve -b under the publish\wwwroot folder

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
image

MimeMappingsTest fails on Mac

When running dotnet test on mac, I get the following error. It looks repeatable. Is it possible to include mac on your scheduled build. I have not investigated.

The following test fails

McMaster.DotNet.Serve.Tests.MimeTests.ItAppliesMimeMappings(file: "/file.mytxt", expectedContents: "contents of file.mytxt\n", expectedMime: "application/x-mytxt", mimeMap: ["mytxt=application/x-mytxt"]) [FAIL]

below is the output

fork-dotnet-serve > dotnet test
Test run for /Users/alanhemmings/src/git-alan-public/fork-dotnet-serve/.build/bin/dotnet-serve.Tests/Debug/netcoreapp3.0/dotnet-serve.Tests.dll(.NETCoreApp,Version=v3.0)
Microsoft (R) Test Execution Command Line Tool Version 16.3.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...

A total of 1 test files matched the specified pattern.
                                                                                                                                                                                            
Test Run Successful.
Total tests: 15
     Passed: 15
 Total time: 12.5962 Seconds
Test run for /Users/alanhemmings/src/git-alan-public/fork-dotnet-serve/.build/bin/dotnet-serve.Tests/Debug/netcoreapp2.1/dotnet-serve.Tests.dll(.NETCoreApp,Version=v2.1)
Microsoft (R) Test Execution Command Line Tool Version 16.3.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...

A total of 1 test files matched the specified pattern.
[xUnit.net 00:00:07.51]     McMaster.DotNet.Serve.Tests.MimeTests.ItAppliesMimeMappings(file: "/file.mytxt", expectedContents: "contents of file.mytxt\n", expectedMime: "application/x-mytxt", mimeMap: ["mytxt=application/x-mytxt"]) [FAIL]
  X McMaster.DotNet.Serve.Tests.MimeTests.ItAppliesMimeMappings(file: "/file.mytxt", expectedContents: "contents of file.mytxt\n", expectedMime: "application/x-mytxt", mimeMap: ["mytxt=application/x-mytxt"]) [530ms]
  Error Message:
   System.NullReferenceException : Object reference not set to an instance of an object.
  Stack Trace:
     at McMaster.DotNet.Serve.Tests.MimeTests.ItAppliesMimeMappings(String file, String expectedContents, String expectedMime, String[] mimeMap) in /Users/alanhemmings/src/git-alan-public/fork-dotnet-serve/test/dotnet-serve.Tests/MimeTests.cs:line 47
--- End of stack trace from previous location where exception was thrown ---
  Standard Output Messages:
 Starting: /usr/local/share/dotnet/dotnet /Users/alanhemmings/src/git-alan-public/fork-dotnet-serve/.build/bin/dotnet-serve.Tests/Debug/netcoreapp2.1/tool/dotnet-serve.dll --verbose -d /Users/alanhemmings/src/git-alan-public/fork-dotnet-serve/.build/bin/dotnet-serve.Tests/Debug/netcoreapp2.1/TestAssets/Mime -p 9005 -m mytxt=application/x-mytxt
 dotnet-serve: Starting server, serving .


                                                                                                                                                                                            
Test Run Failed.
Total tests: 14
     Passed: 13
     Failed: 1
 Total time: 13.1573 Seconds
fork-dotnet-serve > 

fallback-file doesn't work with Blazor webassembly

Describe the bug
I'm trying to use fallback-file with a Blazor webassembly application. I get 404 when I'm loading URL:s that should return the fallback page.

This is related to #104.

To Reproduce
Steps to reproduce the behavior:

Create, publish and host a Blazor Webassembly application like this:

dotnet new create blazorwasm
dotnet publish
dotnet serve --port 5200 --directory bin/Release/net8.0/publish/wwwroot --fallback-file "bin/Release/net8.0/publish/wwwroot/index.html"

Navigate to http://localhost:5200/ and click on counter page. This works fine.

Now, navigate to http://localhost:5200/counter. 404 is returned, but the content in index.html was expected.

Logs

Starting server, serving bin\Release\net8.0\publish\wwwroot
Listening on:
  http://localhost:5200

Press CTRL+C to exit
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 GET http://localhost:5200/counter - -
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[0]
      Executing endpoint 'Fallback {*path:nonfile}'
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[1]
      Executed endpoint 'Fallback {*path:nonfile}'
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished HTTP/1.1 GET http://localhost:5200/counter - - - 404 - text/html 10.6292ms

[Question] Is there a way to override arbitrary kestrel options

I've got a site that relies on very long URL strings, so I'd like to increase the default maxQueryString config option in kestrel. I believe this would usually be done in the web.config, but I guess we don't have a way to override that in dotnet serve. Any ideas or tricks to achieve the same?

I'm using dotnet serve to self-host a react site so that I can look into a production issue with a profile build. It's really handy :)

Support for SSL

Are you going to support SSL with custom certificate & private key?

Project status: maintenance mode

At this point, I believe dotnet-serve is a stable tool and I am not planning for anything specific. This is not dead -- I will fix bugs as necessary -- but I'm not doing any new features myself. See CONTRIBUTING.md for how to get involved.

Releases of dotnet-serve will occur almost immediately after contributions are merged. There is no schedule because the rate of contributions is very low. When new features are added, I plan to release them almost immediately to NuGet.org. Adding bake time doesn't provide any benefit IMO, and no one uses pre-release versions of command line tools, so there is no point in dragging it out.

Feel free to add comments/questions below.

Add support for extensionless URLs

This is valuable when serving files from static site generators which often use this pattern to create friendly URLs. Many web servers also support it (particularly those intended for static sites like GitHub Pages and Netlify), so this would bring dotnet-serve in line with the destination server if the site will eventually be served by one of those.

I propose the feature should be opt-in behind a CLI option -e|--extensionless.

My initial thoughts on implementation are that this would require creating and registering custom middleware. I already have a similar implementation of this feature for the local development server that ships with Wyam (https://github.com/Wyamio/Wyam/blob/develop/src/core/Wyam.Hosting/Owin/ExtensionlessUrlsMiddleware.cs), and it's architecture is pretty similar to this project, so I'm hoping a port wouldn't be too difficult.

System.TypeLoadException: Method 'GetFallbackPolicyAsync' ... does not have an implementation

I'm getting this when trying to run dotnet serve using .net core 3.0 rc1

System.TypeLoadException: Method 'GetFallbackPolicyAsync' in type 'McMaster.DotNet.Serve.NullAuthPolicyProvider' from assembly 'dotnet-serve, Version=1.3.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation

at McMaster.DotNet.Serve.Startup.ConfigureServices(IServiceCollection services)
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)

dotnet --version
3.0.100-rc1-014190

googleapis/google-api-dotnet-client#1434 (comment) is a possible fix or workaround but needs to be done in the library itself I think

Add support for LiveReload

In Wyam I finally figured out how to get LiveReload working with nothing but ASP.NET Core WebSockets.

There’s a couple parts to this:

  • An embedded JavaScript file that can be served on a well-known path.
  • Middleware that injects a script directive in every page to the embedded JS file when LiveReload is activated.
  • Middleware that establishes the LiveReload WebSocket connection with the clients.
  • A file system watcher that tells connected clients to reload their current page when the file system changes (this can even get more granular like only reloading a specific path, but I’ve found just reloading whatever the client is viewing is safer).

I think this would be a nice enhancement - is it something you’d be interested in me porting over (I can’t promise how quickly though 😄)?

Add flag for compression level

Is your feature request related to a problem? Please describe.
BrotliCompressionProviderOptions has a 'Level' property, but the provider used in dotnet-serve can only provide the default option

Describe the solution you'd like

Add a "--compression-level" flag (or something to that effect) which parses as System.IO.Compression.CompressionLevel enum

Reporting wrong host

Describe the bug
dotnet serve reports a wrong host (or perhaps does not report all the host that it is serving on).

To Reproduce
dotnet serve --address 0.0.0.0

Output in the terminal:

Starting server, serving .
Listening on:
http://localhost:37161

But it is possible to reach it on all the network interfaces.

Expected behavior
Listening on should be http://0.0.0.0:3761 or all the hosts should be reported.

Thank you.

Can't find runtime on Amazon Linux EC2 instance

Describe the bug
Tried to run dotnet serve on a x64 AL EC2 instance and run into issues.

.NET SDK 8 and runtime is installed and confirmed working.

To Reproduce
Steps to reproduce the behavior:

  1. Launch an EC2 instance with x64 architecture and Amazon Linux
  2. Install .NET 8 with the MSFT shell script as suggested
  3. Install dotnet serve
  4. Update .bashrc as requested
  5. Make sure dotnet functions correctly with dotnet --list-sdks and dotnet --list-runtimes
  6. Run dotnet serve in a directory.

Expected behavior
dotnet serve starts

Screenshots
This is the output in the shell upon running:

[ec2-user@]$ dotnet --list-runtimes
Microsoft.AspNetCore.App 8.0.1 [/home/ec2-user/.dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.1 [/home/ec2-user/.dotnet/shared/Microsoft.NETCore.App]
[ec2-user@]$ dotnet --list-sdks
8.0.101 [/home/ec2-user/.dotnet/sdk]
[ec2-user@]$ dotnet serve
You must install .NET to run this application.

App: /home/ec2-user/.dotnet/tools/dotnet-serve
Architecture: x64
App host version: 8.0.1
.NET location: Not found

Learn more:
https://aka.ms/dotnet/app-launch-failed

Download the .NET runtime:
https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=x64&rid=linux-x64&os=amzn.2023&apphost_version=8.0.1
[ec2-user@]$

Additional context
dotnet --info output:

.NET SDK:
 Version:           8.0.101
 Commit:            6eceda187b
 Workload version:  8.0.100-manifests.69afb982

Runtime Environment:
 OS Name:     amzn
 OS Version:  2023
 OS Platform: Linux
 RID:         linux-x64
 Base Path:   /home/ec2-user/.dotnet/sdk/8.0.101/

.NET workloads installed:
 Workload version: 8.0.100-manifests.69afb982
There are no installed workloads to display.

Host:
  Version:      8.0.1
  Architecture: x64
  Commit:       bf5e279d92

.NET SDKs installed:
  8.0.101 [/home/ec2-user/.dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 8.0.1 [/home/ec2-user/.dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 8.0.1 [/home/ec2-user/.dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  Not set

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

System.ArgumentException: An item with the same key has already been added. Key: Cross-Origin-Embedder-Policy

Describe the bug
I want to add two headers so that SharedArrayBuffer can be enabled on the JavaScript side so I set up the .netconfig file as follow:

[serve]
    header = Cross-Origin-Embedder-Policy: require-corp
    header = Cross-Origin-Opener-Policy: same-origin

Sometimes it works, sometimes it doesn't work. Error message: System.ArgumentException: An item with the same key has already been added. Key: Cross-Origin-Embedder-Policy

To Reproduce
Steps to reproduce the behavior:
Environment: Ubuntu 22

  1. Run dotnet serve
  2. Or run dotnet serve --headers "Cross-Origin-Embedder-Policy:require-corp" --headers "Cross-Origin-Opener-Policy:same-origin"

You can just test this repo in Github codespace:
https://github.com/Jasonlhy/emcc-playground

Environment Windows 11

  1. Run dotnet serve is fine without facing any issues, it can also add the two headers
  2. Run dotnet serve --headers "Cross-Origin-Embedder-Policy:require-corp" --headers "Cross-Origin-Opener-Policy:same-origin" will face the same issue

Workaround
Run dotnet serve .netconfig

Expected behavior
Two headers should be added successfully without facing any error

Screenshots
image

[Question] Serving HTML file content when request omits file extension

I'm looking for functionality to emulate the behavior of Cloudflare Pages described in Serving Pages​​. For example if a file named /contact.html exists, but the URL requested is /contact it would return the content instead of 404.

Looking at the documentation, the --reverse-proxy option looks promising. Would that be the best way to achieve this and what would the pattern look like? I'm hoping @mlaily can chime in since he introduced this feature in #85.

dotnet serve -d dist\demo1 not working in .NET 6

Describe the bug

The -d command option usage is not what I expected.

To Reproduce
Steps to reproduce the behavior:

  1. Using this version (run dotnet serve --version): 1.8.34+6a96cbef9da7bfc86f6424f2ee499819cc617f7a

  2. Run these arguments '....'

    This command is not working.

    dotnet serve -d dist\demo1

    This is okay.

    dotnet serve --directory dist\demo1

    This is okay too.

    dotnet serve -d=dist\demo1
  3. See error

Expected behavior

This command should working.

```sh
dotnet serve -d dist\demo1
```

Screenshots
If applicable, add screenshots to help explain your problem.

Specify --help for a list of available options and commands.
Unexpected error: McMaster.Extensions.CommandLineUtils.UnrecognizedCommandParsingException: Unrecognized command or argument 'dist\demo1'
   at McMaster.Extensions.CommandLineUtils.CommandLineProcessor.ProcessUnexpectedArg(String argTypeName, String argValue)
   at McMaster.Extensions.CommandLineUtils.CommandLineProcessor.ProcessCommandOrParameter(CommandOrParameterArgument arg)
   at McMaster.Extensions.CommandLineUtils.CommandLineProcessor.ProcessNext()
   at McMaster.Extensions.CommandLineUtils.CommandLineProcessor.Process()
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Parse(String[] args)
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync(String[] args, CancellationToken cancellationToken)
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
   at McMaster.DotNet.Serve.Program.Run(String[] args) in D:\a\dotnet-serve\dotnet-serve\src\dotnet-serve\Program.cs:line 46

image

Additional context
Add any other context about the problem here.

-a switch to set the address is not working

Describe the bug
The shorthand switch for "--address" - "-a" is not working.

To Reproduce
dotnet serve -a 0.0.0.0

Starting server, serving .
Listening on:
http://localhost:35011

Expected behavior
I expect to be able reach the service on other interfaces than localhost, but only localhost works. Changing -a to --address fixes it.

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.