aspnetcore/test/TestSites/StartupHelloWorld.cs

22 lines
650 B
C#

// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
namespace TestSites
{
public class StartupHelloWorld
{
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
{
loggerFactory.AddConsole();
app.UseIISPlatformHandler();
app.Run(ctx =>
{
return ctx.Response.WriteAsync("Hello World");
});
}
}
}