Last active
January 14, 2016 23:12
-
-
Save davesearle/4e0e3d8fe9cff70cd60f to your computer and use it in GitHub Desktop.
This file contains 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
using Microsoft.AspNet.Builder; | |
using Microsoft.AspNet.Hosting; | |
using Microsoft.Extensions.DependencyInjection; | |
namespace TourOfHeroes | |
{ | |
public class Startup | |
{ | |
public Startup(IHostingEnvironment env) | |
{ | |
} | |
// This method gets called by the runtime. Use this method to add services to the container. | |
public void ConfigureServices(IServiceCollection services) | |
{ | |
services.AddMvc(); | |
} | |
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. | |
public void Configure(IApplicationBuilder app, IHostingEnvironment env) | |
{ | |
if (env.IsDevelopment()) | |
{ | |
app.UseBrowserLink(); | |
app.UseDeveloperExceptionPage(); | |
app.UseDatabaseErrorPage(); | |
} | |
app.UseIISPlatformHandler(options => options.AuthenticationDescriptions.Clear()); | |
app.UseStaticFiles(); | |
app.UseMvc(routes => | |
{ | |
routes.MapRoute( | |
name: "default", | |
template: "{controller=Home}/{action=Index}/{id?}"); | |
}); | |
} | |
// Entry point for the application. | |
public static void Main(string[] args) => WebApplication.Run<Startup>(args); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment