Files
Yi.Admin/src/Yi.Framework/Yi.Framework.Web/Program.cs

29 lines
593 B
C#
Raw Normal View History

2023-01-11 11:10:59 +08:00
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();