A helper for setting up web applications; currently a template rather than a nuget
await WebApplication
.CreateBuilder(args)
.BuildConfiguration()
.ConfigureEnvironment()
.ConfigureServices()
.ConfigureCustomServices() // this will be for adding specific singletons etc
.ConfigureLogging()
.Build()
.ConfigureApp()
.LogSections("Logging")
.RunAsync();
using IServiceScope serviceScope = CreateDefaultBuilder(args)
.BuildConfiguration()
.AddService<CloneHeroHelper>()
.Build()
.Services
.CreateScope();
await serviceScope.ServiceProvider
.GetRequiredService<CloneHeroHelper>()
.RunAsync();