How do I host my own nuget v3 feed?

I wrote a nuget server aspnetcore middleware recently.

Of cource the implementation is so foolish, ugly etc... link

You can set up it in the Startup.cs

public void ConfigureServices( IServiceCollection services )
{
    ...
    services.AddNugetServer(opt=>
    {
        opt.ApiKey = "This is a string used for adds or deletes your package(s)";
        opt.PackageDirectory = "/path/to/your/packages"; //default is current path + "/packages"
    });
    ...
}

public void Configure( IApplicationBuilder app, IHostingEnvironment env )
{
    ...
    app.UseNugetServer();
}

And visit http(s)://your-server-address[:port]/v3/index.json

Publishing:

dotnet nuget push -s http(s)://your-server-address[:port]/v3/package package.nupkg