43 lines
1.0 KiB
C#
43 lines
1.0 KiB
C#
|
|
using Cortex.Mediator.DependencyInjection;
|
|
using Lutra.Application.Verspakketten;
|
|
|
|
namespace Lutra.API
|
|
{
|
|
public class Program
|
|
{
|
|
public static void Main(string[] args)
|
|
{
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
builder.Services.AddCortexMediator(
|
|
configuration: builder.Configuration,
|
|
handlerAssemblyMarkerTypes: [typeof(Program), typeof(GetVerspakketten)],
|
|
options => options.AddDefaultBehaviors()
|
|
);
|
|
|
|
builder.Services.AddControllers();
|
|
// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi
|
|
builder.Services.AddOpenApi();
|
|
|
|
|
|
var app = builder.Build();
|
|
|
|
// Configure the HTTP request pipeline.
|
|
if (app.Environment.IsDevelopment())
|
|
{
|
|
app.MapOpenApi();
|
|
}
|
|
|
|
app.UseHttpsRedirection();
|
|
|
|
app.UseAuthorization();
|
|
|
|
|
|
app.MapControllers();
|
|
|
|
app.Run();
|
|
}
|
|
}
|
|
}
|