KI-Kunst-Kirsten-Kloeckner/KIKunstKirstenKlöckner/Program.cs

36 lines
928 B
C#
Raw Normal View History

2023-08-02 16:20:21 +02:00
using KIKunstKirstenKlöckner.Data;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Web;
2023-08-02 21:33:09 +02:00
using Radzen;
2023-08-02 16:20:21 +02:00
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddRazorPages();
builder.Services.AddServerSideBlazor();
builder.Services.AddSingleton<WeatherForecastService>();
2023-08-02 21:33:09 +02:00
builder.Services.AddScoped<TooltipService>();
builder.Services.AddScoped<DialogService>();
builder.Services.AddScoped<NotificationService>();
2023-08-02 16:20:21 +02:00
var app = builder.Build();
// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Error");
// 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.UseRouting();
app.MapBlazorHub();
app.MapFallbackToPage("/_Host");
app.Run();