demo_trade_image_api/Program.cs
2024-10-04 16:00:40 +03:00

16 lines
371 B
C#

using Microsoft.Extensions.FileProviders;
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
app.MapGet("/", () => "Hello World!");
app.UseStaticFiles( new StaticFileOptions {
FileProvider = new PhysicalFileProvider(
Path.Combine(builder.Environment.ContentRootPath, "Images")),
RequestPath = "/images"
}
);
app.Run();