/
fxk
/
SimpleQuiz
Обзор
Документация
Войти
/
fxk
/
SimpleQuiz
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
SimpleQuizClient/Program.cs
34 строки
973 B
fxk
Изменил вьюшки под новый тип данных
17 мар 2025, 01:56
17 мар 2025, 01:56
beebbf7
Код
Авторство
О чём код?
using SimpleQuizClient.Components; using System.Text.Json.Serialization; using MudBlazor.Services; using SimpleQuizClient; var builder = WebApplication.CreateBuilder(args); // Add services to the container. builder.Services.AddRazorComponents() .AddInteractiveServerComponents(); builder.Services.AddMudServices(); builder.Services.AddScoped(serviceType => new HttpClient {BaseAddress = new Uri("http://localhost:5005")}); builder.Services.AddScoped(serviceType => new ApiClient()); var app = builder.Build(); // Configure the HTTP request pipeline. if (!app.Environment.IsDevelopment()) { app.UseExceptionHandler("/Error", createScopeForErrors: true); // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. app.UseHsts(); } app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseAntiforgery(); app.MapRazorComponents<App>() .AddInteractiveServerRenderMode(); app.Run();