21 lines
495 B
C#
21 lines
495 B
C#
using StitcherApi.Controllers;
|
|
using StitcherApi.Services;
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
var assetPath =
|
|
Environment.GetEnvironmentVariable("ASSET_PATH_RO")
|
|
?? Path.Combine(builder.Environment.ContentRootPath, "assets");
|
|
|
|
builder.Configuration["AssetPath"] = assetPath;
|
|
|
|
builder.Services.AddSingleton<IImageService, ImageService>();
|
|
builder.Services.AddProblemDetails();
|
|
|
|
var app = builder.Build();
|
|
|
|
app.UseExceptionHandler();
|
|
|
|
app.MapImageEndpoints();
|
|
|
|
app.Run();
|