37 lines
971 B
C#
37 lines
971 B
C#
namespace JiShe.CollectBus.Host
|
|
{
|
|
public class Startup(IConfiguration configuration)
|
|
{
|
|
public void ConfigureServices(IServiceCollection services)
|
|
{
|
|
services.AddControllers();
|
|
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
|
services.AddEndpointsApiExplorer();
|
|
services.AddSwaggerGen();
|
|
}
|
|
|
|
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
|
{
|
|
if (env.IsDevelopment())
|
|
{
|
|
app.UseDeveloperExceptionPage();
|
|
app.UseSwagger();
|
|
app.UseSwaggerUI();
|
|
}
|
|
|
|
app.UseHttpsRedirection();
|
|
app.UseStaticFiles();
|
|
|
|
app.UseRouting();
|
|
|
|
app.UseAuthorization();
|
|
|
|
//app.UseEndpoints(endpoints =>
|
|
//{
|
|
// endpoints.MapRazorPages();
|
|
//});
|
|
}
|
|
}
|
|
|
|
}
|