2024-04-02 15:35:57 -05:00
|
|
|
using Blog.Components;
|
|
|
|
|
|
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
|
|
2024-04-03 12:02:00 -05:00
|
|
|
builder.Services
|
|
|
|
|
.AddRazorComponents()
|
|
|
|
|
.AddInteractiveServerComponents();
|
2024-04-02 15:35:57 -05:00
|
|
|
|
|
|
|
|
var app = builder.Build();
|
|
|
|
|
|
2024-04-03 12:02:00 -05:00
|
|
|
if (app.Environment.IsProduction())
|
2024-04-02 15:35:57 -05:00
|
|
|
{
|
2024-04-03 12:02:00 -05:00
|
|
|
app.UseExceptionHandler("/Error", createScopeForErrors: true);
|
|
|
|
|
app.UseHsts();
|
2024-04-02 15:35:57 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
app.UseHttpsRedirection();
|
|
|
|
|
|
|
|
|
|
app.UseStaticFiles();
|
|
|
|
|
app.UseAntiforgery();
|
|
|
|
|
|
2024-04-03 12:02:00 -05:00
|
|
|
app
|
|
|
|
|
.MapRazorComponents<App>()
|
|
|
|
|
.AddInteractiveServerRenderMode();
|
2024-04-02 15:35:57 -05:00
|
|
|
|
2024-04-08 23:34:32 -05:00
|
|
|
app.Run();
|
|
|
|
|
|
|
|
|
|
public partial class Program {}
|