This commit is contained in:
2025-05-04 22:11:28 +08:00
parent 09afa239a6
commit b7eb0f9a68
69 changed files with 344 additions and 178 deletions

View File

@@ -1,3 +1,8 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.OpenApi.Any;
using Microsoft.OpenApi.Models;
using Scalar.AspNetCore;
namespace Yes.Blog
{
public class Program
@@ -10,8 +15,6 @@ namespace Yes.Blog
builder.Services.RegisterApplicationModule();
builder.Services.RegisterDataModule();
builder.Services.AddEndpointsApiExplorer();
var app = builder.Build();
// Configure the HTTP request pipeline.
@@ -20,8 +23,12 @@ namespace Yes.Blog
app.UseExceptionHandler("/Error");
// 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.MapOpenApi();
app.MapScalarApiReference();
}
app.UseHttpsRedirection();
app.UseStaticFiles();