Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

27 lines
540B

  1. var builder = WebApplication.CreateBuilder(args);
  2. // Add services to the container.
  3. builder.Services.AddControllers();
  4. // Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi
  5. builder.Services.AddOpenApi();
  6. var app = builder.Build();
  7. // Configure the HTTP request pipeline.
  8. if (app.Environment.IsDevelopment())
  9. {
  10. app.MapOpenApi();
  11. }
  12. app.UseHttpsRedirection();
  13. app.UseAuthorization();
  14. app.MapControllers();
  15. app.MapGet("/health", () => Results.Ok(new { status = "ok" }));
  16. app.Run();
  17. public partial class Program;

Powered by TurnKey Linux.