chore: setup initial docker development

This commit is contained in:
Stevan Freeborn
2024-04-03 12:02:00 -05:00
parent dd092738aa
commit 6e090f9b4b
15 changed files with 122 additions and 61 deletions
+10 -11
View File
@@ -2,18 +2,16 @@ using Blog.Components;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddRazorComponents()
.AddInteractiveServerComponents();
builder.Services
.AddRazorComponents()
.AddInteractiveServerComponents();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
if (app.Environment.IsProduction())
{
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.UseExceptionHandler("/Error", createScopeForErrors: true);
app.UseHsts();
}
app.UseHttpsRedirection();
@@ -21,7 +19,8 @@ app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseAntiforgery();
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode();
app
.MapRazorComponents<App>()
.AddInteractiveServerRenderMode();
app.Run();
app.Run();