Downgrade to .net6
This commit is contained in:
40
Program.cs
40
Program.cs
@ -1,24 +1,32 @@
|
||||
using GetFromLoki.Services;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
namespace GetFromLoki;
|
||||
|
||||
// Add services to the container.
|
||||
builder.Services.AddControllers();
|
||||
builder.Services.AddEndpointsApiExplorer();
|
||||
builder.Services.AddSwaggerGen();
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Register Loki service
|
||||
builder.Services.AddHttpClient<ILokiService, LokiService>();
|
||||
builder.Services.Configure<LokiOptions>(
|
||||
builder.Configuration.GetSection("Loki"));
|
||||
// Add services to the container.
|
||||
builder.Services.AddControllers();
|
||||
builder.Services.AddEndpointsApiExplorer();
|
||||
builder.Services.AddSwaggerGen();
|
||||
|
||||
var app = builder.Build();
|
||||
// Register Loki service
|
||||
builder.Services.AddHttpClient<ILokiService, LokiService>();
|
||||
builder.Services.Configure<LokiOptions>(
|
||||
builder.Configuration.GetSection("Loki"));
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI();
|
||||
var app = builder.Build();
|
||||
|
||||
app.UseAuthorization();
|
||||
app.MapControllers();
|
||||
// Configure the HTTP request pipeline.
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI();
|
||||
|
||||
app.Run();
|
||||
app.UseAuthorization();
|
||||
app.MapControllers();
|
||||
|
||||
app.Run();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user