项目结构目录规划。

This commit is contained in:
administrator committed 2023-12-08 15:22:20 +08:00
1 parent a054944e6e
commit b32b8a78da
122 files changed
+3045 -1

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
using HelloShop.WebApp;
using HelloShop.WebApp.Components;
var builder = WebApplication.CreateBuilder(args);
// Add service defaults & Aspire components.
builder.AddServiceDefaults();
// Add services to the container.
builder.Services.AddRazorComponents()
.AddInteractiveServerComponents();
builder.Services.AddOutputCache();
builder.Services.AddHttpClient<WeatherApiClient>(client=> client.BaseAddress = new("http://apiservice"));
var app = builder.Build();
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Error", createScopeForErrors: true);
}
app.UseStaticFiles();
app.UseAntiforgery();
app.UseOutputCache();
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode();
app.MapDefaultEndpoints();
app.Run();