This commit is contained in:
2025-08-21 14:56:35 +05:00
commit ecde1f0eeb
10 changed files with 923 additions and 0 deletions

24
Program.cs Normal file
View File

@ -0,0 +1,24 @@
using GetFromLoki.Services;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
// Register Loki service
builder.Services.AddHttpClient<ILokiService, LokiService>();
builder.Services.Configure<LokiOptions>(
builder.Configuration.GetSection("Loki"));
var app = builder.Build();
// Configure the HTTP request pipeline.
app.UseSwagger();
app.UseSwaggerUI();
app.UseAuthorization();
app.MapControllers();
app.Run();