Use FullHostBuilder to run a complete TaskHub microservice with all shared infrastructure — database, authentication, telemetry, caching, and more.
await new FullHostBuilder(args)
.Add(builder =>
{
// Register your domain services and repositories.
})
.Use(app =>
{
// Configure your request pipeline here.
})
.StartWith<YourDbContext>(options =>
{
options.ConnectionString = "DbName";
});
FullHostBuilder is built on top of BasicHostBuilder and automatically configures all shared components used across TaskHub microservices.
Before your own services are added, several shared integrations are registered automatically:
AddAppDbContext<TContext> using the connection string from HostOptions.AddAppRedis() for caching, pub/sub, and distributed locks.AddAppAuthentication() for unified token-based access.AddAuthorizationService() for shared access control policies.AddAppOpenTelemetry() to collect traces, logs, and metrics for Grafana Tempo, Loki, and Prometheus.FullHostBuilder provides a complete startup pipeline that:
To use FullHostBuilder, make sure you have added Redis, database, and telemetry settings in your appsettings.json.
See AppSettings.md.