Skip to content

Instantly share code, notes, and snippets.

@IEvangelist
Created January 14, 2016 17:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IEvangelist/e821cd35852a87709b1c to your computer and use it in GitHub Desktop.
Save IEvangelist/e821cd35852a87709b1c to your computer and use it in GitHub Desktop.
public void Configure(IApplicationBuilder app,
IHostingEnvironment env,
ILoggerFactory loggerFactory)
{
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
loggerFactory.AddDebug();
if (env.IsDevelopment())
{
app.UseBrowserLink();
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Home/Error");
}
app.UseIISPlatformHandler(options =>
options.AuthenticationDescriptions.Clear());
app.UseStaticFiles();
app.UseGlimpse();
app.UseMvc(routes =>
{
routes.MapRoute("default",
"{controller=Home}/{action=Index}/{id?}");
routes.MapRoute("spa-fallback",
"{*anything}",
new { controller = "Home", action = "Index" });
routes.MapWebApiRoute("defaultApi",
"api/{controller}/{id?}");
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment