diff options
Diffstat (limited to 'PersonalApi/Program.cs')
-rw-r--r-- | PersonalApi/Program.cs | 25 |
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 @@ | |||
1 | var builder = WebApplication.CreateBuilder(args); | ||
2 | |||
3 | // Add services to the container. | ||
4 | |||
5 | builder.Services.AddControllers(); | ||
6 | // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle | ||
7 | builder.Services.AddEndpointsApiExplorer(); | ||
8 | builder.Services.AddSwaggerGen(); | ||
9 | |||
10 | var app = builder.Build(); | ||
11 | |||
12 | // Configure the HTTP request pipeline. | ||
13 | if (app.Environment.IsDevelopment()) | ||
14 | { | ||
15 | app.UseSwagger(); | ||
16 | app.UseSwaggerUI(); | ||
17 | } | ||
18 | |||
19 | app.UseHttpsRedirection(); | ||
20 | |||
21 | app.UseAuthorization(); | ||
22 | |||
23 | app.MapControllers(); | ||
24 | |||
25 | app.Run(); | ||