2024-02-08 23:06:16 +01:00

23 lines
381 B
C#

using GrpcCalculator.Server;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
var app = builder.Build();
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}
app.UseHttpsRedirection();
app.MapGroup("/")
.MapCalculatorApi()
.WithOpenApi();
app.Run();