natemcmaster / dotnet-serve

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

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Question] Can I use this nuget package in C# project for .net 5 (not command line)

zydjohnHotmail opened this issue · comments

Hello:
I looked at your repo., it looks good. But I need a small localhost http server in my C# project, my C# project will be running about 15 to 16 hours a day.
I can’t see any code example to run this in C# project (target .net 5.0)
Please show me some code example, if I can run a simple http server in C# project.
Thanks,

This looks like a duplicate of #39.

I don't plan to support using the code as a class library, but if someone wants to go to the trouble of refactoring the code to support it, I would consider accepting a pull request.