Hacker News new | ask | show | jobs
by Gluber 651 days ago
It is actually possible, to seperate those things, but it's tricky. Our current product can run in several modes, one with a web ui and api and one without. If running without there is no trace of the ASP.NET Core Pipeline ( and Kestrel is also not running )

We're using ASP.NET Core Minimal APIS for both API and UI (if configured to run in that mode )

1 comments

Yeah we have a similar product, where we spin up multiple web servers. Code looks something like this:

        var builder = WebApplication.CreateBuilder([]);

        builder.WebHost.UseUrls($"http://127.0.0.1:0");

        builder.Services.AddSingleton(...);

        var app = builder.Build();

        app.Map...

        await app.StartAsync(cancellationToken);

We run multiple of these at a time and have no problems.