Created
November 7, 2014 19:59
-
-
Save CoreyKaylor/c4e3223d80698159b192 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Startup | |
{ | |
public void Configure(IApplicationBuilder app) | |
{ | |
app.UseStaticFiles(); | |
app.UseServices(services => | |
{ | |
services.AddMvc(); | |
services.SetupOptions<MvcOptions>(x => | |
{ | |
x.OutputFormatters.Add(new ViewOutputFormatter()); | |
}); | |
}); | |
// Add MVC to the request pipeline | |
app.UseMvc(routes => | |
{ | |
routes.MapRoute( | |
name: "default", | |
template: "{controller}/{action}/{id?}", | |
defaults: new { controller = "Home", action = "Index" }); | |
routes.MapRoute( | |
name: "api", | |
template: "{controller}/{id?}"); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment