29 lines
1.2 KiB
C#
29 lines
1.2 KiB
C#
using Prometheus;
|
|||
|
|
using MemeVault.Infrastructure;
|
||
|
|
|
||
|
|
var builder = WebApplication.CreateBuilder(args);
|
||
|
|
|
||
|
|
// ── Application ───────────────────────────────────────────────────────────────
|
||
|
|
builder.Services.AddMediatR(cfg =>
|
||
|
|
cfg.RegisterServicesFromAssembly(
|
||
|
|
typeof(MemeVault.Application.Commands.SaveMedia.SaveMediaCommand).Assembly));
|
||
|
|
|
||
|
|
// ── Infrastructure (DB + Redis) ───────────────────────────────────────────────
|
||
|
|
builder.Services.AddInfrastructure(builder.Configuration);
|
||
|
|
|
||
|
|
var app = builder.Build();
|
||
|
|
|
||
|
|
app.UseHttpMetrics();
|
||
|
|
|
||
|
|
app.MapGet("/health", () => Results.Ok(new { status = "ok" }));
|
||
|
|
|
||
|
|
// TODO: /api/media GET — список медиа пользователя
|
||
|
|
// TODO: /api/media POST — загрузить новое медиа (файл или текст)
|
||
|
|
// TODO: /api/media/{id} DELETE
|
||
|
|
// TODO: /api/tags GET — теги пользователя
|
||
|
|
// TODO: /api/collections GET/POST — коллекции
|
||
|
|
|
||
|
|
app.MapMetrics();
|
||
|
|
|
||
|
|
app.Run();
|