summaryrefslogtreecommitdiff
path: root/Blog/Program.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Blog/Program.cs')
-rw-r--r--Blog/Program.cs28
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 @@
1using Blog.Components;
2using Microsoft.AspNetCore.Builder;
3using Microsoft.Extensions.DependencyInjection;
4using Microsoft.Extensions.Hosting;
5
6var builder = WebApplication.CreateBuilder(args);
7
8// Add services to the container.
9builder.Services.AddRazorComponents();
10
11var app = builder.Build();
12
13// Configure the HTTP request pipeline.
14if (!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
21app.UseHttpsRedirection();
22
23app.UseAntiforgery();
24
25app.MapStaticAssets();
26app.MapRazorComponents<App>();
27
28app.Run(); \ No newline at end of file