aboutsummaryrefslogtreecommitdiff
path: root/PersonalApi/Program.cs
diff options
context:
space:
mode:
Diffstat (limited to 'PersonalApi/Program.cs')
-rw-r--r--PersonalApi/Program.cs25
1 files changed, 25 insertions, 0 deletions
diff --git a/PersonalApi/Program.cs b/PersonalApi/Program.cs
new file mode 100644
index 0000000..48863a6
--- /dev/null
+++ b/PersonalApi/Program.cs
@@ -0,0 +1,25 @@
1var builder = WebApplication.CreateBuilder(args);
2
3// Add services to the container.
4
5builder.Services.AddControllers();
6// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
7builder.Services.AddEndpointsApiExplorer();
8builder.Services.AddSwaggerGen();
9
10var app = builder.Build();
11
12// Configure the HTTP request pipeline.
13if (app.Environment.IsDevelopment())
14{
15 app.UseSwagger();
16 app.UseSwaggerUI();
17}
18
19app.UseHttpsRedirection();
20
21app.UseAuthorization();
22
23app.MapControllers();
24
25app.Run();