Ajoutez des fichiers projet.

This commit is contained in:
nathanpire
2026-03-01 16:08:37 +01:00
parent b25dbbb095
commit 05bea695bd
9 changed files with 130 additions and 0 deletions

28
CityInfo.API/Program.cs Normal file
View File

@@ -0,0 +1,28 @@
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
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.UseSwaggerUI(options =>
{
options.SwaggerEndpoint("/openapi/v1.json", "API v1");
});
}
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
app.Run();