Hacker News new | ask | show | jobs
by noworriesnate 660 days ago
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.