c3stream/Startup.cs

35 lines
1.1 KiB
C#
Raw Normal View History

2020-12-28 06:10:48 +01:00
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
2022-02-09 20:51:35 +01:00
namespace c3stream;
2020-12-28 06:10:48 +01:00
2022-02-09 20:51:35 +01:00
public class Startup {
public Startup(IConfiguration configuration) => Configuration = configuration;
2020-12-28 06:10:48 +01:00
2022-02-09 20:51:35 +01:00
public IConfiguration Configuration { get; }
2020-12-28 06:10:48 +01:00
2022-02-09 20:51:35 +01:00
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services) {
services.AddRazorPages();
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env) {
if (env.IsDevelopment())
app.UseDeveloperExceptionPage();
else
app.UseExceptionHandler("/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
2020-12-28 06:10:48 +01:00
2022-02-09 20:51:35 +01:00
app.UseStaticFiles();
2020-12-28 06:10:48 +01:00
2022-02-09 20:51:35 +01:00
app.UseRouting();
2020-12-28 06:10:48 +01:00
2022-02-09 20:51:35 +01:00
app.UseAuthorization();
2020-12-28 06:10:48 +01:00
2022-02-09 20:51:35 +01:00
app.UseEndpoints(endpoints => { endpoints.MapRazorPages(); });
2020-12-28 06:10:48 +01:00
}
}