forked from microsoft/vscode-remote-try-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
29 lines (27 loc) · 1.08 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*----------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE in the project root for license information.
*---------------------------------------------------------------------------------------*/
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
namespace aspnetapp
{
public class Program
{
public static void Main(string[] args)
{
var host = Host.CreateDefaultBuilder()
.ConfigureWebHostDefaults(webBuilder => {
webBuilder.Configure(app => {
app.UseHttpsRedirection()
.Run(async context => {
await context.Response.WriteAsync("Hello remote world from ASP.NET Core!");
});
});
});
host.Build().Run();
}
}
}