1
0
mirror of https://github.com/XFox111/PhonebookService.git synced 2026-04-22 06:29:55 +03:00
Files
PhonebookService/PhonebookService.Api/Program.cs
T
Eugene Fox 340500ebbd Initial commit.
- Created and set up main projects
- Created classes for Domain
2023-02-22 15:35:18 +03:00

26 lines
555 B
C#

WebApplicationBuilder 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();
WebApplication app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
app.Run();