Skip to content

Instantly share code, notes, and snippets.

@umayeras
Created October 15, 2020 07:47
Show Gist options
  • Save umayeras/fc5acc1b7517687eeb3b6b964fe3dae6 to your computer and use it in GitHub Desktop.
Save umayeras/fc5acc1b7517687eeb3b6b964fe3dae6 to your computer and use it in GitHub Desktop.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseSwagger();
app.UseSwaggerUI(c =>
{
c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1");
});
app.UseHttpsRedirection();
app.UseRouting();
app.UseAuthorization();
app.UseEndpoints(endpoints => { endpoints.MapControllers(); });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment