Aggiunta preliminare progetti SRV-API

This commit is contained in:
Samuele Locatelli
2023-04-17 19:32:33 +02:00
parent 6230fa3512
commit ab9438d590
8 changed files with 143 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
var app = builder.Build();
// Configure the HTTP request pipeline.
// abilitato temporaneamente anche in iis01...
if (app.Environment.IsDevelopment() || app.Environment.IsStaging())
{
app.UseSwagger();
app.UseSwaggerUI();
}
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
app.Run();