ASCU_ALL/ApiServer/Startup.cs

28 lines
838 B
C#
Raw Permalink Normal View History

2021-07-30 14:49:24 +05:00
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
2021-07-31 22:27:59 +05:00
using Microsoft.Extensions.Configuration;
2021-07-30 14:49:24 +05:00
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace ApiServer
{
public class Startup
{
2021-07-31 22:27:59 +05:00
public Startup(IConfiguration configuration) { Configuration = configuration; }
public IConfiguration Configuration { get; }
public void ConfigureServices(IServiceCollection services) { services.AddControllers(); }
2021-07-30 14:49:24 +05:00
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
2021-07-31 22:27:59 +05:00
if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); }
2021-07-30 14:49:24 +05:00
app.UseRouting();
2021-07-31 22:27:59 +05:00
app.UseEndpoints(endpoints => { endpoints.MapControllers(); });
2021-07-30 14:49:24 +05:00
}
}
}