28 lines
473 B
C#
Raw Normal View History

2024-02-05 21:33:40 +01:00
using AdverCalculator.Server;
2024-02-05 15:58:38 +01:00
2024-02-05 21:33:40 +01:00
var builder = WebApplication.CreateBuilder(args);
2024-02-05 15:58:38 +01:00
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
var app = builder.Build();
app.UseDefaultFiles();
app.UseStaticFiles();
2024-02-05 21:33:40 +01:00
2024-02-05 15:58:38 +01:00
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}
app.UseHttpsRedirection();
2024-02-05 21:33:40 +01:00
CalculatorEndpoints.Map(app);
2024-02-05 15:58:38 +01:00
app.MapFallbackToFile("/index.html");
app.Run();