stabilizaiton work - projects rework for maintenanceability and ui livening
This commit is contained in:
@@ -8,6 +8,7 @@ using StellaOps.PacksRegistry.Infrastructure.Verification;
|
||||
using StellaOps.PacksRegistry.WebService;
|
||||
using StellaOps.PacksRegistry.WebService.Contracts;
|
||||
using StellaOps.PacksRegistry.WebService.Options;
|
||||
using StellaOps.Auth.ServerIntegration;
|
||||
using StellaOps.Router.AspNet;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
@@ -56,6 +57,8 @@ builder.Services.AddSingleton(TimeProvider.System);
|
||||
|
||||
builder.Services.AddHealthChecks();
|
||||
|
||||
builder.Services.AddStellaOpsCors(builder.Environment, builder.Configuration);
|
||||
|
||||
// Stella Router integration
|
||||
var routerOptions = builder.Configuration.GetSection("PacksRegistry:Router").Get<StellaRouterOptionsBase>();
|
||||
builder.Services.TryAddStellaRouter(
|
||||
@@ -63,13 +66,16 @@ builder.Services.TryAddStellaRouter(
|
||||
version: typeof(Program).Assembly.GetName().Version?.ToString() ?? "1.0.0",
|
||||
routerOptions: routerOptions);
|
||||
|
||||
builder.TryAddStellaOpsLocalBinding("packsregistry");
|
||||
var app = builder.Build();
|
||||
app.LogStellaOpsLocalHostname("packsregistry");
|
||||
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
app.MapOpenApi();
|
||||
}
|
||||
|
||||
app.UseStellaOpsCors();
|
||||
app.MapHealthChecks("/healthz");
|
||||
app.TryUseStellaRouter(routerOptions);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user