source:
iknow-api/Program.cs@
2e5e3a8
| Last change on this file since 2e5e3a8 was 2e5e3a8, checked in by , 11 months ago | |
|---|---|
|
|
| File size: 445 bytes | |
| Rev | Line | |
|---|---|---|
| [0b16523] | 1 | var builder = WebApplication.CreateBuilder(args); |
| [2e5e3a8] | 2 | |
| [0b16523] | 3 | // Add services to the container. |
| [2e5e3a8] | 4 | |
| [0b16523] | 5 | builder.Services.AddControllers(); |
| [2e5e3a8] | 6 | // Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi |
| [0b16523] | 7 | builder.Services.AddOpenApi(); |
| 8 | ||
| 9 | var app = builder.Build(); | |
| 10 | ||
| 11 | // Configure the HTTP request pipeline. | |
| 12 | if (app.Environment.IsDevelopment()) | |
| 13 | { | |
| 14 | app.MapOpenApi(); | |
| 15 | } | |
| 16 | ||
| 17 | app.UseHttpsRedirection(); | |
| [2e5e3a8] | 18 | |
| [0b16523] | 19 | app.UseAuthorization(); |
| [2e5e3a8] | 20 | |
| [0b16523] | 21 | app.MapControllers(); |
| 22 | ||
| 23 | app.Run(); |
Note:
See TracBrowser
for help on using the repository browser.
