23 lines
564 B
C#
23 lines
564 B
C#
using Emergence.api.Extensions;
|
|
using Emergence.services.Extensions;
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
// Add services to the container.
|
|
// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi
|
|
builder.Services.AddOpenApi();
|
|
builder.Services.AddServices();
|
|
builder.Services.AddEndpoints(typeof(Program).Assembly);
|
|
|
|
var app = builder.Build();
|
|
|
|
|
|
app.UseHttpsRedirection();
|
|
app.MapEndpoints();
|
|
// Configure the HTTP request pipeline.
|
|
if (app.Environment.IsDevelopment())
|
|
{
|
|
app.MapOpenApi("/openapi/emergence.yaml");
|
|
}
|
|
app.Run();
|