mirror of
https://github.com/yawaflua/yaflay.ru.git
synced 2025-12-09 20:19:32 +02:00
49 lines
1.2 KiB
C#
49 lines
1.2 KiB
C#
using Microsoft.Extensions.Options;
|
|
|
|
namespace yaflay.ru
|
|
{
|
|
public class Startup
|
|
{
|
|
private readonly IConfiguration configuration;
|
|
public Startup()
|
|
{
|
|
configuration = new ConfigurationBuilder()
|
|
.AddEnvironmentVariables(prefix: "m.")
|
|
.AddJsonFile("appsettings.json", optional: true)
|
|
.Build();
|
|
}
|
|
public void ConfigureServices(IServiceCollection services)
|
|
{
|
|
services.AddControllers();
|
|
services.AddRouting();
|
|
services.AddRazorPages();
|
|
//services.AddDirectoryBrowser();
|
|
|
|
|
|
|
|
}
|
|
|
|
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
|
{
|
|
// Add services to the container.
|
|
// app.Services.AddRazorPages();
|
|
|
|
|
|
// Configure the HTTP request pipeline.
|
|
|
|
app.UseStaticFiles();
|
|
app.UseRouting();
|
|
|
|
app.UseAuthorization();
|
|
|
|
app.UseEndpoints(endpoints =>
|
|
{
|
|
endpoints.MapRazorPages();
|
|
endpoints.MapControllers();
|
|
|
|
});
|
|
|
|
}
|
|
}
|
|
}
|