Files
dotnet-packaging/demo/aspnetcore/Startup.cs
Frederik Carlier b270c69e3e Use .NET Core 3.0 SDK to build (#124)
* Apps: target netcoreapp2.0, netcoreapp2.1 and netcoreapp3.0
This allows them to run on a wide range of SDKs

* Unit tests: run on netcoreapp3.0
This is the SDK we expect to be used when building dotnet-packaging

* Use .NET SDK 3.0
2019-11-21 21:23:06 +01:00

41 lines
1.2 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
namespace aspnetcore
{
public class Startup
{
// This method gets called by the runtime. Use this method to add services to the container.
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapGet("/", async context =>
{
await context.Response.WriteAsync("Hello World!");
});
});
}
}
}