diff options
| author | Marijn Besseling <njirambem@gmail.com> | 2025-09-07 20:56:09 +0200 |
|---|---|---|
| committer | Marijn Besseling <njirambem@gmail.com> | 2025-09-07 20:56:09 +0200 |
| commit | 9ab322751a732d8cbc1ddf4f2ecf5022d7242baa (patch) | |
| tree | 49abc49c7d148b2f575aa5daef32875d44729561 /Blog/Program.cs | |
WIP migration
Diffstat (limited to 'Blog/Program.cs')
| -rw-r--r-- | Blog/Program.cs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Blog/Program.cs b/Blog/Program.cs new file mode 100644 index 0000000..0d38e90 --- /dev/null +++ b/Blog/Program.cs | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | using Blog.Components; | ||
| 2 | using Microsoft.AspNetCore.Builder; | ||
| 3 | using Microsoft.Extensions.DependencyInjection; | ||
| 4 | using Microsoft.Extensions.Hosting; | ||
| 5 | |||
| 6 | var builder = WebApplication.CreateBuilder(args); | ||
| 7 | |||
| 8 | // Add services to the container. | ||
| 9 | builder.Services.AddRazorComponents(); | ||
| 10 | |||
| 11 | var app = builder.Build(); | ||
| 12 | |||
| 13 | // Configure the HTTP request pipeline. | ||
| 14 | if (!app.Environment.IsDevelopment()) | ||
| 15 | { | ||
| 16 | app.UseExceptionHandler("/Error", createScopeForErrors: true); | ||
| 17 | // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. | ||
| 18 | app.UseHsts(); | ||
| 19 | } | ||
| 20 | |||
| 21 | app.UseHttpsRedirection(); | ||
| 22 | |||
| 23 | app.UseAntiforgery(); | ||
| 24 | |||
| 25 | app.MapStaticAssets(); | ||
| 26 | app.MapRazorComponents<App>(); | ||
| 27 | |||
| 28 | app.Run(); \ No newline at end of file | ||