16 lines
371 B
C#
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();
|