Skip to content

Instantly share code, notes, and snippets.

@luisenriquecorona
Last active July 4, 2019 23:43
Show Gist options
  • Save luisenriquecorona/04242ba17276adb4d9c4ffc80080ae5d to your computer and use it in GitHub Desktop.
Save luisenriquecorona/04242ba17276adb4d9c4ffc80080ae5d to your computer and use it in GitHub Desktop.
ASP.NET Core Startup Class The configuration of the execution pipeline of an ASP.NET Core application is done via the Configure method of the Startup class. At its simplest this method needs a parameter of type IApplicationBuilder to receive an instance of the application builder, which is used to assemble together all middleware components. sho…
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
puplic void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.Run(async (context) =>
{
await context.Response.WriteAsync("Hello World!");
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment