Skip to content

Instantly share code, notes, and snippets.

@tugcearar
Last active September 4, 2018 13:08
Show Gist options
  • Save tugcearar/9365c18beadd1a5b5d57011d40cb3b90 to your computer and use it in GitHub Desktop.
Save tugcearar/9365c18beadd1a5b5d57011d40cb3b90 to your computer and use it in GitHub Desktop.
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
app.UseSwagger();
app.UseSwaggerUI(c =>
{
c.SwaggerEndpoint("/swagger/v1/swagger.json", "MyWebAPI Helper Page");
});
}
else
{
app.UseExceptionHandler("/Home/Error");
}
app.UseStaticFiles();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment