框架搭建

This commit is contained in:
陈淳
2023-01-11 11:10:59 +08:00
parent 1ed37897d5
commit b2ac98d25e
949 changed files with 794 additions and 71152 deletions

View File

@@ -0,0 +1,28 @@
using Yi.Framework.Core.Extensions;
var builder = WebApplication.CreateBuilder(args);
builder.UseYiModules();
// Add services to the container.
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
app.Run();