28 lines
514 B
C#
28 lines
514 B
C#
using Dipper.Alioth;
|
|
using Dipper.Alioth.Web;
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
builder.Services.AddControllers();
|
|
builder.Services.AddEndpointsApiExplorer();
|
|
builder.Services.AddSwaggerGen();
|
|
builder.AddStarApp(option =>
|
|
{
|
|
option.Asterisms.Add(new DomainAsterism());
|
|
});
|
|
var app = builder.Build();
|
|
|
|
if (app.Environment.IsDevelopment())
|
|
{
|
|
app.UseSwagger();
|
|
app.UseSwaggerUI();
|
|
}
|
|
|
|
app.UseHttpsRedirection();
|
|
|
|
app.UseAuthorization();
|
|
|
|
app.MapControllers();
|
|
app.UseStarApp();
|
|
|
|
app.Run(); |